Add read-only ETag-stripped detector mode - #99
Merged
Merged
Conversation
Run drift detection from an ETag-stripped copy of canonical state through a local backend, require the planner role, and report state-binding gaps truthfully. Add shipped-workflow regression coverage for the mode matrix, reporter lifecycle, strip guard, and pinned-provider 304-to-200 behavior. Co-Authored-By: Claude Opus 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.
Scope
This ships the framework capability only and enables nothing until the separate caller pieces F1a and R1b land with the merged framework SHA. No caller repository is changed by this PR.
Owner/IAM precondition
Before either caller enables detector mode, the owner/IAM work must be completed. The organization planner role currently trusts only
pull_requestsubjects, while schedule, push, and dispatch runs use the main-ref subject. The personal runner currently has noAWS_PLAN_ROLE_TO_ASSUMEsecret. Until this precondition is satisfied, a detector run would fail at OIDC role assumption.Each caller needs its own
aws_plan_role_arnpassed asAWS_PLAN_ROLE_TO_ASSUME, with trust for both its PR and actual main-ref subject forms, pinned by repository identity andjob_workflow_ref. Its permissions are read-only: exact-state-keys3:GetObject, prefix-scopeds3:ListBucketpluss3:GetObjectfor private definitions, andkms:Decryptonly if the object uses a customer-managed key; no S3 write action and no writer-role fallback.Spike-derived facts
If-None-Matchrequest header. Providerconfig.go:60-62wraps logging outside the ETag transport, soTF_LOG=DEBUGcontains zero occurrences of that header even when affected reads return 304.resource_changes[]actions and the humanPlan:summary are identical before and after, while every affected address gains an ETag-onlyresource_drift[]entry on every stripped run. Issue existence and closure therefore remain keyed only to actionableresource_changes[]; the reporter does not parseresource_drift[].Acceptance
actionlint .github/workflows/reusable-terraform-deploy.yamlmake ciwith Terraform 1.15.4 on PATH: 93 Terraform tests, 14 detector-mode tests, and 12 destroy-guard tests passed.🤖 Generated with Claude Code