feat(choudoufu): attribute drift from the plan, opt-in on refresh — a second mark on a bound card, the attributes in the diff pane (#404) - #406
Merged
Conversation
lex00
force-pushed
the
feat/behaviour-397
branch
from
September 10, 2026 21:41
38cf2d7 to
437ab7b
Compare
… second mark on a bound card, the attributes in the diff pane (#404) One commit on main. The plan read is `plan -out` then `show -json` (choudoufu 0.16's `plan -json` is its ownership document and carries no values), opt-in through a second palette row and cached under the member's source stamp; ownership stays the card's colour, a drifted bound card gets a dashed mark and a count glyph, the inspect pane shows before → after with sensitive values redacted, the legend counts drifted only when the plan was read. Three plan documents recorded against the iam-ecr cohort. The docs say a green card is ownership, not "nothing changed". PR #406 has the account. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DoXg2GDWwXJRPQo76t9Nrq
lex00
force-pushed
the
feat/choudoufu-drift-404
branch
from
September 10, 2026 21:43
6d1b150 to
5f2776a
Compare
Merged
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.
Closes #404. Stacked on #405 (the behaviour overlay), which is stacked on #395 and #392.
A bound choudoufu card stayed green while
choudoufu planshowed an attribute change, because the overlay is composed fromlive-lsandlive-plan, which answer ownership and never read a value. This adds the attribute half, opt-in.What changed
choudoufu plan -jsonon 0.16.0 is choudoufu's own ownership document, not OpenTofu's change stream, and carries no attribute values — measured, not assumed. So the read isplan -input=false -out=<tmp>thenshow -json <tmp>(format 1.2,resource_changes[].change.{actions,before,after}), the plan file under amkdtempin the OS temp dir and removed in afinally, never inside the served member. Argv pinned insrc/choudoufu-plan.ts.?plan=1on/api/overlayand/api/diff, sent by a second palette row, "Re-check live with plan (attribute drift)". Not the existing refresh:planis one provider read per resource (301 on terralith-4), andPOST /api/refreshis a primary-only re-observe that never composes the estate, so it is both the cheap button and the wrong request. Cached under the member's source stamp, so a reload after a refresh does not re-plan. Never on the initial read.~ 2 attributesglyph; the names are in the tooltip and the inspect pane, wherediff.changesrendersbefore → afterthrough the existingpairCellpath with one new label word,planned. Sensitive values read(sensitive), unknowns(known after apply). The legend and statusbar sayn driftedonly when the plan was read;meta.driftis{ read: false }or{ read: true, drifted: n }so the SPA can tell "not looked" from "none". A planned create on an unowned resource is not drift.tagschange on the role with both markers identical on each side, which is exactly why the ownership half never noticed, andimage_tag_mutabilityIMMUTABLE → MUTABLE on the repository), and a create.Verified live
On the iam-ecr cohort against floci: green with no drift clause; one out-of-band change;
?plan=1marks the card while it stays bound and green,/api/diffnames the attributes with before → after, the legend reads2 drifted; a reload without the flag serves the cache; the attribute restored, the drift is gone. Both gates green; no scratch container left.🤖 Generated with Claude Code
https://claude.ai/code/session_01DoXg2GDWwXJRPQo76t9Nrq