Skip to content

Stabilize hook CopyFiles fingerprints#2048

Open
julianknutsen wants to merge 1 commit into
mainfrom
rca/config-drift-copyfiles
Open

Stabilize hook CopyFiles fingerprints#2048
julianknutsen wants to merge 1 commit into
mainfrom
rca/config-drift-copyfiles

Conversation

@julianknutsen
Copy link
Copy Markdown
Collaborator

@julianknutsen julianknutsen commented May 13, 2026

RCA

Desired-state hashing was recording CopyFiles before runtime provider overlays had materialized and canonicalized hook files in the workdir. On the next reconciliation tick, those Gas City-managed hook artifacts had different content hashes, so sessions drained for config-drift even though operator intent had not changed.

.gc/scripts remains in CopyFiles as requested, because script changes are intended to trigger churn.

Fix

  • Materialize effective pack/agent provider overlays before desired-state fingerprinting.
  • Keep copied hook files scoped to the resolved provider and requested install-hook slots.
  • Preserve Claude city settings handling and .gc/scripts drift behavior.
  • Add regression coverage proving runtime staging no longer changes the core fingerprint.

Validation

  • go test ./cmd/gc -run 'TestBuildDesiredState_MaterializesHookOverlaysBeforeFingerprinting|TestBuildDesiredState_InstallsGeminiHooksBeforeFingerprinting|TestStageHookFiles' -count=1
  • go test ./internal/runtime ./internal/overlay -count=1
  • go test ./cmd/gc -count=1

Bead: mc-jkh5n4t

@julianknutsen julianknutsen added status/needs-review-auto PR review requested with auto approval status/reviewing and removed status/needs-review-auto PR review requested with auto approval labels May 13, 2026
@github-actions github-actions Bot added the status/needs-triage Inbox — we haven't looked at it yet label May 13, 2026
@julianknutsen julianknutsen removed the status/needs-triage Inbox — we haven't looked at it yet label May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant