Skip to content

chore(devtools): drop stale baseline entries for deleted paths - #5698

Merged
Sinity merged 1 commit into
masterfrom
fix/prune-stale-baselines
Sep 27, 2026
Merged

Sinity merged 1 commit into
masterfrom
fix/prune-stale-baselines

Conversation

@Sinity

@Sinity Sinity commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Summary

Commits the layering-surface and sqlite-degradation baselines with the stale entries removed (embed.py archive_identity import, indexing.py degradation anchor).

Problem

On current master the quick gates prune these entries in place during the run. Rewriting tracked files mid-run changes the checkout, so verify voids the result and every PR's hosted quick gate fails.

Solution

Take the gates' own pruned output and commit it. No code changes.

Verification

devtools verify --quick on this branch: verify: PASSED exit=0, and the working tree stays clean afterwards.

Residuals

Gates should report stale baseline entries as a failure with a fix command instead of rewriting tracked files during a run; filed as a bead.

🤖 Generated with Claude Code

https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4

…xing paths

The quick gates prune these entries when the listed code no longer
exists, which rewrote tracked files mid-run and voided every hosted
quick-gate result. Commit the pruned baselines.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-27T23:11:23.623293Z 8ec05b4 PR opened
ℹ️ 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.

@Sinity
Sinity enabled auto-merge (squash) September 27, 2026 23:09
@Sinity
Sinity merged commit b64f2f7 into master Sep 27, 2026
3 checks passed
@Sinity
Sinity deleted the fix/prune-stale-baselines branch September 27, 2026 23:16
Sinity added a commit that referenced this pull request Sep 28, 2026
)

## Summary
The layering gate no longer rewrites tracked baselines during a run.
Stale layering and SQLite-degradation baseline entries become blocking
findings that name the fix command, `devtools gate layering
--prune-baselines`, the only route that writes.

## Problem
When a baseline entry no longer reproduced, the gate pruned
`docs/plans/layering-surface-baseline.json` and
`docs/plans/sqlite-degradation-baseline.json` in place. `devtools
verify` compares the Git-visible content before and after the run, saw
the change, and voided the result as `checkout_moved_during_run`. Every
branch carrying a stale entry therefore failed the hosted quick gate
with no code fault (bead polylogue-hzyyv). Reproduced locally on #5704's
head: `verify --quick` ended `checkout_moved_during_run`, with only
those two baselines modified.

## Solution
- `devtools/verify_layering.py`: new `--prune-baselines` flag. Without
it, stale entries are `layering_baseline_stale` /
`sqlite_degradation_baseline_stale` violations and nothing is written.
The ratchet property is kept: a fixed violation's exemption cannot
survive, because the gate fails until the shrink is committed.
- Tests updated to pass the flag where they exercised pruning, plus a
test that the plain gate leaves the baseline byte-identical.

## Verification
- `devtools gate layering` on master: passed, working tree unchanged.
- `devtools test tests/unit/devtools/test_layering_gates.py`: one
failure in the new test (an over-strict set assertion), fixed; rerun of
that test: PASSED.

## Residuals
Branches whose base predates #5698 now fail visibly with
`layering_baseline_stale` instead of a voided run; rebasing onto master
clears it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.

1 participant