Drift subsystem cleanup: prune inert code, pin excludeFamilies, mirror-equivalence guard, trim workflow perms#336
Merged
Merged
Conversation
commit: |
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.
Drift subsystem cleanup
Fast-follow to the deterministic self-healing drift re-architecture (#335). Four low-risk cleanups the CR flagged as follow-ups; no behavior change to the shipped remediation flow.
What changed
commitSyncChanges, which leftbuildPrBody,gatedCommitFiles,isProductionFile(and their orphaned helperstruncateBody/GH_BODY_MAX/GH_BODY_SAFE_MAX/affectedSkillSections/BUILDER_TO_SKILL_SECTION) with no production caller. Removed them and their tests.claude-fable-5— the registry intentionally carries a forward-looking family that isn't live yet, so the sync proposed removing it every run. Added a smallisForwardLookingFamilyallowlist applied at the sync-policy layer (detectDeprecatedFamiliesForSync); the canonical detector is unchanged, so genuine retirements are still detected.excludeFamilies/includeFamiliesdata —logic-pin.test.tspreviously froze only the classification rules, not the membership data; a family could have been silenced by adding it straight toexcludeFamilies. Added aDATA_FROZENchecksum block (hashes the live sets) that fails loudly on any membership change.detectDeprecatedFamiliesfor normal families, and explicitly asserts the one intended forward-looking divergence (so removing the filter above fails the test).checks: read/statuses: read(and their app-token counterparts + a stale comment) fromfix-drift.yml; nothing in the workflow consumes check-runs or statuses, and it does no auto-merge.Review
Tier-1 CR (correctness + test-guard quality), 2 reviewers, 0 mandatory findings — both empirically verified the new pins/guards are non-vacuous (recomputed all 6 data-pin hashes; confirmed the mirror-divergence test fails if the forward-looking filter is removed).
Test evidence
tsc --noEmit0 errors · full suite green ·logic-pin20 ·drift-sync-mirror-equivalence28.Deferred follow-ups (not in this PR)
$metadata: the 2 forced-credential failures in the bedrock drift leg are a category error in the drift test's own SDK-shape stubs — they compare the SDK client-output shape (which includes$metadata) against the raw wire body.$metadatais synthesized by the AWS SDK from HTTP status/headers after deserialization; it is not part of the Bedrock wire response. The correct fix is to the test stubs (dormant — needs a live Bedrock recording), not the mock.models.drift.ts, so a localpnpm testrun with provider API keys exported would also execute the live-availability suites (harmless in CI, which sets no keys). De-coupling would require extracting the canonical predicates into a non-.drift.tsmodule — deferred.🤖 Generated with Claude Code
https://claude.ai/code/session_01KamK73Wu5heLxJEogM6hHC