Skip to content

feat(feed+control): config revision/provenance (#254) + query by change_id (#255) - #260

Merged
VijitSingh97 merged 1 commit into
developfrom
claude/v18-254-255
Jul 13, 2026
Merged

feat(feed+control): config revision/provenance (#254) + query by change_id (#255)#260
VijitSingh97 merged 1 commit into
developfrom
claude/v18-254-255

Conversation

@VijitSingh97

Copy link
Copy Markdown
Contributor

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} on GET :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 masks pass (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-bumps changed_at/source.

#255 — query a specific change_id

GET :control_port/status?change_id=<16hex> → that change's recorded outcome, or 404. Removes the accepted→poll race (a concurrent change overwriting 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 traversal). 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 what a consumer reads, hashes, and can POST back all agree.

Tests (+18 → 1320)

Hash stability + change-detection + perf==performance canonicalization + pass-change bump + no-false-bump; source/change_id attribution (control/local/restore); ?change_id 200/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

…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
VijitSingh97 enabled auto-merge (squash) July 13, 2026 04:08
@VijitSingh97
VijitSingh97 merged commit 63f0886 into develop Jul 13, 2026
9 checks passed
@VijitSingh97
VijitSingh97 deleted the claude/v18-254-255 branch July 13, 2026 04:10
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant