Repository navigation
fix(cli): re-fetch live dogfood writes to catch silent no-ops - #5334
Merged
Merged
Conversation
Live dogfood treated a mutating command's success status as proof the write landed. A sibling get/show now checks that one submitted field persisted, and fails when a pre-read shows the field unchanged. Closes #4234 Co-authored-by: Trevin Chow <tmchow@users.noreply.github.com>
Contributor
Merge Protections🟢 All 2 merge protections satisfied — ready to merge. Show 2 satisfied protections🟢 require-ready-label-and-ci
🟢 🚦 Auto-queueWhen all merge protections are satisfied and these conditions match, this pull request will be queued automatically.
|
Contributor
[Medium impact] The PR appears safe to merge; both numbered findings are fixed and no new blocking issue was found. SummaryAdds a separate
|
Scalar flags follow pflag: the last value wins, and a value flag takes the next argv even when it is "--" or looks like a flag. Sibling reads carry the write's connection flags, or skip when that target cannot be copied. Number checks stay exact past 2^53, more than one JSON value is inconclusive, and create/update are typed kinds. Co-authored-by: Trevin Chow <tmchow@users.noreply.github.com>
Explicit shorthand values such as -c=false were dropped, so read-back kept an earlier true and failed a write that had persisted. Numeric comparison also treated fractions and other Rat spellings as equal to different text. Parse single-dash clusters with pflag's rules, and accept only decimal and base-10 scientific text when comparing numbers. Co-authored-by: Trevin Chow <tmchow@users.noreply.github.com>
Closed
59 of 96 tasks
Contributor
✅ Merged into
|
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.
Intent
Issue: Closes #4234
Live dogfood treated a mutating create/update's success status as proof the write persisted. A Redmine print's
issues updatereturned{"status":204,"success":true}while the server ignored a flat body, and the acceptance report still claimed the write lifecycle was tested.Approach
After a live create/update exits 0, dogfood records a separate
write_readbackrow. When it can identify a sibling get/show and the resource id, it re-fetches and checks that one submitted field now holds the submitted value. For updates it reads the resource first, so a field that still holds its previous value fails withmutation reported success but read-back shows field "<name>" unchanged. An advanced modification timestamp counts as the write having landed.The check stays skipped, and does not fail the matrix, when no sibling read exists, the id cannot be determined, the field is absent, the value was only normalized or transformed, another submitted field shows the write landed, the read itself fails, the response has more than one JSON value, or the write's connection target cannot be copied onto the read. Dry-run, preview, delete, and action commands are not checked. One matching field is enough; partial multi-field writes are not flagged.
Sibling reads reuse the write's connection and scope flags (config, profile, base URL, auth, TLS, and data source). Scalar flags follow pflag: the last value wins, a value-taking flag consumes the next argument even when that argument is
--, and a boolean shorthand takes an explicit value only as-c=false(a stuck-on word is more shorthand letters; a cluster that would not parse is dropped). Combined shorthand clusters set each boolean letter and stop at a value-taking letter. Numeric equality is exact decimal or base-10 scientific text, including numeric strings; fractions, base prefixes, underscores, and binary exponents do not match.Scope
Primary area: live dogfood (scorer/verify)
Why this belongs in this repo: the false pass is in the Printing Press live-dogfood runner, so every future print inherits the check.
Risk
A correct CLI fails this row only when a pre-read shows every comparable submitted field still holding its old value. Missing siblings, unrecognized transforms, conflicting JSON, an uncopied connection target, and failed reads are skips. Dry-run and preview rows are unchanged. Generated CLI output, MCP schemas, and goldens are unchanged.
Output Contract
N/A. This does not change templates, generated files, manifests, command output, MCP schemas, or scorecard output.
Verification
Self-review:
=form, and why non-decimal spellings are not treated as the same number.GOOS=linux,GOOS=darwin, andGOOS=windowsgo vet ./internal/pipelinesucceeded. Shared code and tests do not use Linux-only paths, permissions, sudo, or signals.--and other flag-looking tokens are flag values; a bool flag does not consume the next token; a repeated slice is not one comparable field; a missing connection value skips; neighboring integers above 2^53 do not match; newline-separated JSON records are inconclusive. Boolean shorthand=values, mixed long/short repetition, and clusters follow pflag;-cfalseis not the value false. Fractions, base prefixes, underscores, andpexponents do not match stored decimals or numeric strings.id/IDvalues and trailing JSON are inconclusive; dry-run and preview do not run the check; a transformed sibling field does not fail an otherwise unchanged field.Commands on this head:
go test ./internal/pipeline -count=1passed.golangci-lint run ./internal/pipeline(v2.11.4) passed.GOOS=linux,GOOS=darwin, andGOOS=windowsgo vet ./internal/pipelinepassed.AI / Automation Disclosure