Skip to content

ci: allow same-PR unfreeze in the freeze check - #22015

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
gnufede/unfreeze-same-pr
Nov 23, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
gnufede/unfreeze-same-pr

Conversation

@gnufede

@gnufede gnufede commented Nov 23, 2026

Copy link
Copy Markdown
Member

Description

The freeze check enforced the frozen-paths.txt manifest at both the PR base and the merge result, so a PR could not lift its own freeze: unfreezing required one PR that removed the entry while leaving the file untouched, and a second, later PR with the authorized change (e.g. replacing the file with a bridge to the extracted package — #21979 then #21725). That gap left the path unprotected on main between the two merges, risking drift or lost work.

An entry removed from the merge-result manifest now unfreezes its path in the same PR: the manifest removal and the change it authorizes (bridge code) can land together. What stays enforced:

  • Base rules still use the target base, so branches predating a freeze are checked too.
  • Base rules still block updating an entry's hash in the same PR — only removing the entry unfreezes.
  • Merge rules still validate every freeze on the merge result, including newly added ones.
  • Manifest edits remain gated by the CODEOWNERS entry on /frozen-paths.txt (@DataDog/apm-core-python), which is the human authorization for a same-PR unfreeze.

Unfrozen paths are reported as ::notice:: annotations for an audit trail of what a PR unfreezes.

Testing

  • Ran the exact workflow shell (extracted from freeze-check.yml) against synthetic base/merge git states — 12 scenarios, all passing:
    • change file + remove entry (bridge) → pass with notice
    • change file + keep entry (old hash) → fail
    • change file + update hash in same PR → fail (hash update must not lift a freeze)
    • remove entry, file unchanged → pass with notice
    • delete frozen file + remove entry → pass with notice
    • new freeze with correct/wrong hash → pass/fail
    • base predating a freeze → merge rules still enforced
    • remove manifest entirely → pass
    • unfreeze one path while changing another still-frozen path → fail
  • scripts/lint checks — all passing.
  • Runtime tests/benchmarks unnecessary: CI metadata only.

Risks

The freeze check no longer structurally prevents a PR author from removing an entry and changing the file in the same PR. Authorization relies on the required CODEOWNERS review of /frozen-paths.txt from @DataDog/apm-core-python (branch protection) — same trust model as manifest edits in general.

Additional Notes

No release note: CI metadata only, no customer-visible behavior (changelog/no-changelog).

Removing a frozen entry required its own PR that left the file
unchanged, with the authorized change (e.g. replacing the file with
a bridge to the extracted package) landing in a later PR. That gap
left the path unprotected on main between the two merges (#21979
then #21725), risking drift or lost work.

An entry removed from the merge-result manifest now unfreezes its
path in the same PR, so the manifest removal and the bridge can land
together. Base rules still block updating a hash in the same PR to
lift a freeze: only removal does. Manifest edits remain gated by the
CODEOWNERS entry on /frozen-paths.txt (@DataDog/apm-core-python).
@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Codeowners resolved as

Resolved from the full PR diff against main using the target branch CODEOWNERS file.
CODEOWNERS team requests not listed below are not required by the current file set.

.github/workflows/freeze-check.yml                                      @DataDog/apm-python-guild @DataDog/apm-core-python
frozen-paths.txt                                                        @DataDog/apm-core-python

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Dependency direction analysis

⚠️ Existing dependency direction violations

There are 22 dependency direction violations that already exist on the base branch and have not been changed by this PR.

Show existing violations (showing 5 of 22 highest severity)
ddtrace.internal.tracemethods -×-> ddtrace.trace  (internal-core -> product:tracing, score=103)
ddtrace.llmobs._integrations.base -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=101)
ddtrace.llmobs._integrations.bedrock_agents -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=101)
ddtrace.internal.span_bus -×-> ddtrace._trace.span  (internal-core -> product:tracing, score=35)
ddtrace.llmobs._llmobs -×-> ddtrace._trace.span  (product:llmobs -> product:tracing, score=33)

To see all violations, download the layers-base.json and layers-pr.json artifacts from this CI job and run:

uv run --script scripts/import-analysis/layers.py compare layers-base.json layers-pr.json

@gnufede
gnufede marked this pull request as ready for review November 23, 2026 11:44
@gnufede
gnufede requested review from a team as code owners November 23, 2026 11:44
@gnufede
gnufede requested review from juanjux and removed request for a team November 23, 2026 11:44
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T11:45:41.948077Z f57186c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-datadog-us1-prod datadog-datadog-us1-prod Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

Same-PR unfreezing requires removing the manifest entry. Retained entries still enforce their base hashes, and newly added freezes remain checked against the merge result.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit f57186c

@datadog-datadog-us1-prod

datadog-datadog-us1-prod Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: f57186c | Docs | View more details | Give us feedback!

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 864df71 into main Nov 23, 2026
443 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the gnufede/unfreeze-same-pr branch November 23, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants