feat(feed+control): config revision/provenance (#254) + query by change_id (#255) - #260
Merged
Conversation
…ge_id (#255) The two remaining Pithead-v1.5 producer enhancements. Both ADDITIVE — no change to the v1.7.0 enriched-feed keys or control routes/codes Pithead v1.5 is pinned to. #254: the enriched feed carries rigforge.config_meta = {revision, changed_at, source, last_change_id}. revision is a short content hash of the CANONICAL writable config (stateless — no persisted counter; changes iff the effective writable config changes; hashed unmasked so a pool-password change bumps it too, while the feed still masks pass). A sidecar marker records source (control|local|restore) + last_change_id, stamped by every path that rewrites the writable config (apply/control-apply/restore) via a hash-guard so a no-op apply or an autotune restart never false-bumps it. Lets a poller detect "changed on the rig" and invalidate a stale editor prefill. #255: GET :control_port/status?change_id=<16hex> returns that change's recorded outcome (or 404), removing the accepted->poll race when a concurrent change steps on the most-recent status.json. The applier indexes each outcome under changes/<cid>.json (last ~20; id re-validated as 16-hex before it's a path component). No-arg GET /status stays most-recent; auth unchanged. Refactor: _writable_config_canonical is now the single source of truth for the masked feed view (#253) and the revision hash (#254), so read/hash/POST-back all agree. Tests +18 (1320 total): hash stability + change-detection + alias-canonicalization + pass-change bump + no-false-bump; source/change_id attribution; ?change_id 200/404/400 (incl. path-traversal guard) + no-arg compat + auth. Docs: CHANGELOG, pithead- integration (feed block + ?change_id), ADR 0001 (D10/D11). shellcheck 0.11.0 + shfmt -i 4 + markdownlint clean. Closes #254, closes #255 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
VijitSingh97
enabled auto-merge (squash)
July 13, 2026 04:08
VijitSingh97
added a commit
that referenced
this pull request
Jul 13, 2026
…ge_id (#255) (#260) The two remaining Pithead-v1.5 producer enhancements. Both ADDITIVE — no change to the v1.7.0 enriched-feed keys or control routes/codes Pithead v1.5 is pinned to. #254: the enriched feed carries rigforge.config_meta = {revision, changed_at, source, last_change_id}. revision is a short content hash of the CANONICAL writable config (stateless — no persisted counter; changes iff the effective writable config changes; hashed unmasked so a pool-password change bumps it too, while the feed still masks pass). A sidecar marker records source (control|local|restore) + last_change_id, stamped by every path that rewrites the writable config (apply/control-apply/restore) via a hash-guard so a no-op apply or an autotune restart never false-bumps it. Lets a poller detect "changed on the rig" and invalidate a stale editor prefill. #255: GET :control_port/status?change_id=<16hex> returns that change's recorded outcome (or 404), removing the accepted->poll race when a concurrent change steps on the most-recent status.json. The applier indexes each outcome under changes/<cid>.json (last ~20; id re-validated as 16-hex before it's a path component). No-arg GET /status stays most-recent; auth unchanged. Refactor: _writable_config_canonical is now the single source of truth for the masked feed view (#253) and the revision hash (#254), so read/hash/POST-back all agree. Tests +18 (1320 total): hash stability + change-detection + alias-canonicalization + pass-change bump + no-false-bump; source/change_id attribution; ?change_id 200/404/400 (incl. path-traversal guard) + no-arg compat + auth. Docs: CHANGELOG, pithead- integration (feed block + ?change_id), ADR 0001 (D10/D11). shellcheck 0.11.0 + shfmt -i 4 + markdownlint clean. Closes #254, closes #255 Co-authored-by: Claude Fable 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.
The two remaining Pithead-v1.5 producer enhancements, staged for v1.8.0. Both additive — no change to the v1.7.0 enriched-feed keys or control routes/codes Pithead v1.5 is pinned to; pithead#209's contract test stays green.
#254 — config revision + last-change provenance
rigforge.config_meta = {revision, changed_at, source, last_change_id}onGET :api_port/1/summary.revision= short content hash of the canonical writable config. Stateless (per the issue's allowance — no persisted counter to race/reset); changes iff the effective writable config changes; computed at feed time so it catches even a raw hand-edit. Hashed unmasked so a pool-password change bumps it too, while the feed still maskspass(hash is one-way → no leak).source/last_change_id— a sidecar marker stamped by every path that rewrites the writable config (apply/control-apply/restore), hash-guarded so a no-op apply or an autotune restart (autotune tunes threads/MSR, not the writable config) never false-bumpschanged_at/source.#255 — query a specific
change_idGET :control_port/status?change_id=<16hex>→ that change's recorded outcome, or404. Removes the accepted→poll race (a concurrent change overwriting the most-recentstatus.json). The applier indexes each outcome underchanges/<cid>.json(last ~20; id re-validated as 16-hex before it's a path component — no traversal). No-argGET /statusstays most-recent; auth unchanged.Refactor
_writable_config_canonicalis now the single source of truth for the masked feed view (#253) and the revision hash (#254), so what a consumer reads, hashes, and can POST back all agree.Tests (+18 → 1320)
Hash stability + change-detection +
perf==performancecanonicalization + pass-change bump + no-false-bump; source/change_idattribution (control/local/restore);?change_id200/404/400 incl. path-traversal guard + no-arg compat + auth-required. Docs: CHANGELOG, pithead-integration (feed block +?change_id), ADR 0001 (D10/D11).Closes #254, closes #255
🤖 Generated with Claude Code