GeezerVison is showing github.com — feat(pm-aggregator): applier loop carries broker answers to the decide verb (#14043 S3) by dezren39 · Pull Request #14440 · developing-today/code
Conversation
dezren39
commented
Nov 24, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Part of #14043
Summary
S3 of #14043: the aggregator-side applier that carries a recorded Drew answer for a fleet-actions-exec alert to the queue broker's /actions-exec-extend-decide verb, once, with the signed envelope S1 added on the broker.
pm-stack/aggregator/src/actions-exec-apply.ts: reads answered needs-drew questions with a broker mapping, signs handle|approve|answer_id|answered_at (HMAC-SHA256, key resolved by name), POSTs, and runs the answer_id state machine (pending / applied / superseded / rejected / failed) into a file-backed ledger.
- Race table (design §3) read as terminal: applied / silence-approved superseded / no-pending rejected or superseded if settled / expired grace superseded.
- Double-tap guard: a second answer for the same handle is superseded and never sent.
- Wiring:
PM_AGG_ACTIONS_EXEC_APPLY_FILE config; live-mode 60s pass; kick from the answer endpoint.
- Fix to the S2 mapping: the broker key is
actions-exec-ext:<handle>:<ordinal>, so the handle is the middle part. Without this, a real push would decide against handle fx-…:1 and be refused.
S4 (failure alert actions-exec-apply:<answer_id> and re-raise) is not in this PR; transient failures stay failed for retry.
Open point recorded
The signed answered_at is the answer's own instant, and the broker's replay window is 600s. An answer that is still unapplied after that window is refused by the broker. S4 should surface that as the visible failure.
Proof
bun test test/actions-exec-apply.test.ts test/needs-drew.test.ts test/needs-drew-writeback.test.ts test/alerts.test.ts: 93 pass.
bunx tsc --noEmit: only the pre-existing src/prompts.test.ts error on main.
Not merged by the worker; Archer merges.
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-24T15:24:55Z",
"session_id": "ses_e5df201f924ffed7YzWs9ZW5Rx",
"lane": null,
"host": "amd",
"worktree": "/home/user/git/code-oc-code-08-21655-s3",
"model": null,
"lane_start_issues": [],
"workspace_ref": {
"kind": "worktree",
"id": "/home/user/git/code-oc-code-08-21655-s3",
"repo": "developing-today/code",
"branch": "oc-code-08/14043-s3-applier-loop",
"sha": "10f169afa17977088577c061defbf6eb60dab1fc"
},
"auth_subject": "any-n",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…e verb
S3 of #14043 (design doc/2026-11-24_design_pm14043_answer_writeback.md).
An aggregator-side applier reads the needs-drew answer store, signs the
S1 envelope (HMAC-SHA256 over handle|approve|answer_id|answered_at, key
resolved by name through fleet-secrets) and POSTs
/actions-exec-extend-decide exactly once per answer_id. The broker's
existing outcomes read as terminal: decided:true -> applied,
silence-approved -> superseded with a note, fail-5 no-pending ->
rejected (settled -> superseded), expired grace -> superseded. A
second answer for the same handle is superseded and never sent.
Wiring: a ledger file (PM_AGG_ACTIONS_EXEC_APPLY_FILE), a 60s live-mode
pass, and a kick from the answer endpoint so a tap applies promptly.
S4 adds the actions-exec-apply:<answer_id> failure alert and the
re-throat re-raise; this slice keeps transient failures `failed` for
retry.
Also fixes the S2 raise mapping: the broker's alert key carries the
extension ordinal (actions-exec-ext:<handle>:<n>), so the handle is the
middle part, not the whole suffix.
Tests cover every row of the §3 race table, a double-tap one-decide
test, and applied rows never re-sending.
coderabbitai
Bot
commented
Nov 24, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
a4c45640-e92e-4156-88e2-16450aa68b8f
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
# Conflicts:
# pm-stack/aggregator/src/config.ts
# pm-stack/aggregator/src/server.ts
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|