Remove the deep-scan drift step; salvage health + baseline into Step 9 Finalize#98
Merged
Conversation
… into Step 9 Finalize The drift step (old Step 9) was the slowest post-intent-layer phase and its findings bypassed the verified channel: no triggering_call_site requirement, no backward verification, no hysteresis, regenerated from scratch each run. Everything it claimed to cover is owned by machinery that does it better: - Decision violations / pitfall triggers / trade-off undermining / schema drift: the Wave 2 Risk agent's invariant walk (Step 5b) + edit-time hooks. - Recency coverage: new recency sweep in the Risk agent - in incremental runs the changed_files list (already injected into the Wave 2 preamble) is read file-by-file against documented invariants and per-folder CLAUDE.md patterns, and the resulting findings flow through the verifier. - Recurrence tracking: findings.json (stable ids, confirmed_in_scan, hysteresis) replaces the LLM prose-diff of scan_report.md. Salvaged into the new Step 9 (Finalize, plain bash, no subagent): health measurement (health.json + history), complete-step 9 + save-baseline (the --incremental dependency), telemetry flush, and the closing summary. Removed: drift.py (722 lines), step-9-drift.md, step-10-telemetry.md (absorbed into step-9-finalize.md), templates/scan-report.md, the extract_output deep-drift/recent-files subcommands, the dead filter-ignored subcommand, and the scan_report/drift_report share-bundle sources. Step 8 cleanup and the pip install path now delete stale drift artifacts on upgrade. Accepted losses (signed off): semantic near-twin duplication detection has no successor (health.json verbosity = exact clones only); the share viewer loses the prose report page; telemetry trend continuity breaks on the drift step key. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review (Claude adversarial + testing/maintainability/security specialists + Codex cross-model) confirmed two regressions and a set of stragglers: - Step 8's new `rm -f .archie/drift_report.json .archie/scan_report.md` was not in the Claude permission allowlist (only the tmp/ and health.json rm globs are) and would prompt mid-pipeline on every upgraded project; it was also cwd-relative and skipped per-package workspaces. Moved the retirement sweep to install.py::_clean_legacy_layout (allowlisted, PROJECT_ROOT-anchored, per-workspace) and expanded it: drift_report.json, drift_diff.json, scan_report.md, semantic_duplications.json, drift_history/. - The recency sweep died on any resumed incremental run: changed_files lives only in conversation memory and neither save-run-context nor the Resume Prelude restores it. Both the Wave 2 dispatch and the Resume Prelude now regenerate it via detect-changes (safe: save-baseline only moves at Step 9). Wiring test added. - detect-changes now filters the changed list through IgnoreMatcher - git lists tracked-but-.archieignore'd files, which inflated the incremental threshold and would have fed vendored files to the recency sweep (the deleted filter-ignored subcommand used to provide exactly this). Test added. - step-9-finalize: telemetry flush now runs BEFORE complete-step 9 so an interruption leaves status=in_progress and --continue re-runs the idempotent step instead of stranding the telemetry; the receipt reads the per-folder count from enrich_state.json (not from pre-compact memory) and includes a health line. - --from N is now bounded to 1-9 (a stale --from 10 validated clean and no-opped every step). - Dead code: upload.py _read_text removed (last caller was the scan_report read). Stale references fixed: 'Steps 1-10' in SKILL.md and scope_resolution.md, drift.py/deep-drift/recent-files/templates mentions in ARCHITECTURE.md, drift in CLAUDE.md repo layout, scan_report.md in gitignore.default, 'Top risks' block in the README sample output. - New tests: semantic_duplications bundle behavior (legacy file, structured zero, stale drift_report ignored), installer retirement sweep, a pytest gate running scripts/verify_sync.py, resume-regeneration wiring, and the detect-changes ignore filter. Suite: 985 passed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Deletes the drift step (old Step 9) from the deep-scan pipeline - the slowest post-intent-layer phase - and re-homes everything worth keeping. Net: -2,126 lines.
Why
triggering_call_siterequirement, no backward verification, no hysteresis, regenerated from scratch each run. The 'compare to previous run' story was an LLM prose-diffing the prior scan_report.md - unreliable by construction.findings.json(recurrence with stable ids +confirmed_in_scan+ hysteresis).Changes
health.json+ history),complete-step 9+save-baseline(the--incrementaldependency), telemetry flush, closing summary. Absorbs old Step 10.changed_fileslist file-by-file against documented invariants and per-folder CLAUDE.md patterns; findings flow through the standard verifier. Wiring test added (test_incremental_recency_sweep_is_wired).drift.py,step-9-drift.md,step-10-telemetry.md,templates/scan-report.md,extract_output.pydeep-drift/recent-filessubcommands, deadfilter-ignoredsubcommand,scan_report/drift_reportshare-bundle sources.drift_report.json/scan_report.md/drift.pyon upgrade.drift->finalize(accepted trend-continuity break).Accepted losses (decided in session)
findings.json/health.json.Verification
scripts/verify_sync.pypasses (34 scripts, workflow + assets in sync)pytest: 897 passedGenerated with Claude Code