Repository navigation
Description
PM stack next phase — push answer write-back to the queue broker
The phase: a phone tap on a broker-raised push writes the answer back to the queue broker, so the broker applies it directly — no seat-run intermediary.
Where v1 stops (the gap): the fleet Actions exec tiered lease-extension policy (#13774, tiers live via PR #13854) raises its tier-2/tier-3 asks as answerable pushes. Drew's tap records his answer in the PM ledger through the Phase 1 answer machinery (the tap posts to /api/needs-drew/<ledgerId>/answer under the per-question token; the resolution is recorded and exported like any other). But nothing then applies that answer to the broker: a seat notices the recorded answer and runs /actions-exec-extend-decide ({handle, approve: bool}) by hand. #13774's endpoint list names this exactly: "the phone tap → broker write-back is the PM stack's next phase; v1's write-back is a seat running this verb on Drew's recorded answer." The broker-side alert builder says the same (pkgs/fleet/crates/fleet-queue/src/needs_drew.rs: "the phone -> broker write-back is the PM stack's next phase").
What this phase delivers: when a recorded answer belongs to a broker-sourced alert (first consumer: source fleet-actions-exec, key actions-exec-ext:<handle>, options approve/deny), an applier calls the broker's decide verb with the recorded answer — automatically, exactly once, and with failures raised as alerts rather than dropped log-only. The seat-run step disappears; the ledger remains the place of record for the answer itself.
Why this is design-first (the seams a design of record must settle before a build packet):
- Applier placement — aggregator-side dispatch when a broker-sourced resolution is recorded, vs broker-side consumption of the resolution records the aggregator already exports to the ledger/fleet-feed path. The choice spans both codebases (pm-stack aggregator, pkgs/fleet broker).
- Identity and authority — the decide route is seat-shaped (a seat acting on Drew's answer). What identity does the applier present to the broker, and how does the broker know the call carries Drew's genuine recorded answer? The per-question answer token's authority ends at the aggregator; the broker needs its own reason to trust the application.
- Exactly-once application and races — intake dedupes double-taps/retries by answer id; application must additionally be idempotent against an already-decided session, an expired decision grace, and a tier-2 silence-approval landing before a late tap arrives.
- Failure behaviour — a failed decide application must raise a visible alert (the PM alerts throat returns 401 for the current alerts-intake token — broker-raised pushes dropped #13902 lesson: today a failed raise is a broker log line and nothing else).
Dependency: #13902 (the PM alerts throat returns 401 for the current alerts-intake token — broker-raised pushes dropped) is the prerequisite for any live end-to-end proof: until pushes flow again, a tap answer cannot be exercised against a real session. The aggregator-restart fix for #13902 is in flight as its own lane. Design work for this phase can proceed in parallel; the live proof cannot.
Sibling, not duplicate: #13469 (Phase 2 step 3: edge answer intake + heartbeat drain) is the transport that lets Drew answer while the laptop is down; it lands answers in the same ledger and explicitly leaves "the catcher's application of answers" out of its scope. This phase is that application step, for broker-sourced alerts. The two compose: however an answer reaches the place of record, the applier consumes it from there.
Acceptance (phase level): on a live Actions exec session, Drew taps approve (or deny) on the extension push and the broker applies the decide with no seat in the loop — the session's lease state reflects the answer, the application is recorded against the answer's record, and a forced application failure raises an alert Drew can see. Proven live, the way ACTIONS-EXEC-3's tiers were proven on the production broker.
Prioritization: Drew, 2026-11-23 ~21:13 CST — "Please prioritize that next phase." (Recorded in full, with the queue packet, in the comment below.)
{
"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-24T03:19:33Z",
"session_id": null,
"lane": null,
"host": "htch-runtime",
"worktree": null,
"model": null,
"lane_start_issues": [],
"workspace_ref": null,
"auth_subject": "archer",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Activity
developing-today commentedon Nov 24, 2026
CODE-5159
dezren39 commentedon Nov 24, 2026
Prioritized by Drew — queue packet recorded
Drew's instruction (2026-11-23 ~21:13 CST), in his words: "Please prioritize that next phase." — given on the ACTIONS-EXEC-3 completion report, whose closing note named this gap: the phone-tap answer doesn't write back to the broker yet, so tier-2 and tier-3 answers land through a seat-run decide step on his recorded answer.
What the phase delivers, end state: Drew taps approve or deny on the extension push → the answer, already recorded in the PM ledger by the Phase 1 answer machinery, is applied to the queue broker's
/actions-exec-extend-decideautomatically → the session's lease reflects the answer with no seat in the loop, exactly once, and with application failures raised as visible alerts rather than log lines.Dependency: #13902 (the PM alerts throat 401 — broker-raised pushes currently dropped) must land first for any live end-to-end proof; its aggregator-restart fix is running as a separate lane. The design work below does not wait on it.
First packet (design-completion slice): task 21648 on queue
repo-health-code-pilot, status queued, kindfeature_slice(slice 1: "pm write-back design of record"), dedupe keyrepo-health:v1:slice:developing-today/code:issue:14043:slice-1.Priority: 90 — raised above the programme-standard 70 used for head slices (e.g. tasks 21621/21626) and above everything in the actionable queue at enqueue time (queued maximum was 50), short of 100, which stays reserved for drop-everything emergencies. The packet's
priority_reasoncarries this.Why a design slice first, plainly: the build is not packetisable yet. Four seams need a design of record (they are listed in this issue's body): where the applier lives (aggregator-side dispatch vs broker-side consumption of exported resolutions); what identity the applier presents to the seat-shaped decide route and how the broker trusts that the call carries Drew's genuine recorded answer; exactly-once application against already-decided/expired sessions and the tier-2 silence-approval race; and failure alerting. Slice 1 settles all four and ends with the build-slice map on this issue, each slice sized to a single packet.
— Lane PUSH-WRITEBACK-PRIORITY, 2026-11-24.
dezren39 commentedon Nov 24, 2026
Design of record is up as an unmerged doc-only PR: #14046 (
doc/2026-11-24_design_pm14043_answer_writeback.md+ one index line).Seats settled
recordAnswer. Rejected broker-side consumption of the exported feed.sigonly on/actions-exec-extend-decide; unsigned seat calls keep working. Rejected: a dedicated seat credential, loopback trust.answer_id(pending/applied/superseded/rejected/failed); broker's existing silence-approved and settled outcomes are terminal; a second answer for a handle is superseded.actions-exec-apply:<answer_id>(high); transient failures retry; if the throat is down the failure is re-raised on recovery.Build slices, dependency order
turso_queue/actions_exec.rs,client/actions_exec.rs). Done:cargo test -p fleet-queuecovers valid/bad sig, expiredanswered_at, unsigned seat call.needs-drew.ts,alerts.ts). First step verifies the raise stores the key. Done: unit test.actions-exec-apply.ts). Needs S1+S2. Done: one test per race row, double-tap = one decide.max_untilmoves, applier rowapplied.S1 and S2 are parallel. #13469 composes: edge answers land in the same needs-drew store, read by the same applier; no second path. Not merged, for Archer.
developing-today-fleet commentedon Nov 24, 2026
Correction — the priority-90 claim was inverted.
Drew corrected the queue's priority semantics on 2026-11-23 (~21:45 CST): in the fleet queue, a higher number means LOWER priority. The earlier record on this issue (comment 7121013819) and the task packet's own
priority_reasonboth stated the opposite — that task 21648's priority of 90 placed it "above the programme-standard 70" and above everything else in the actionable queue. That was backwards. Broker read-back (2026-11-24T03:46Z) shows the actionable queue's priorities currently span 20–70, so at 90 the write-back design task actually sat below every other actionable task, including the programme slices at 70.In the event, the inversion did no practical harm here: lane oc-code-06 claimed task 21648 at 2026-11-24T03:22:23Z and completed it at 03:24:16Z, and the design of record is posted on this issue (comment 7121052937; PR #14046). Because the task is terminal (done), no reprioritization is possible or outstanding — priority is set at enqueue and the broker has no reprioritize verb for a completed task.
The same correction applies to Archer's chat report wording from that evening. It does not change any other task's relative order: all of today's programme tasks (21649, 21646, 21647, 21620, 21626, 21630) share priority 70, verified by broker read-back. Standing rule going forward: anything meant to be raised in this queue gets a LOWER number.
Merge pull request #14046 from developing-today/oc-code-06/14043-writ…
developing-today-fleet commentedon Nov 24, 2026
Build slices packetised — all five from the design's map are queued
The design of record's build-slice map (design doc §6, summary in comment 7121052937) is now packetised. Each packet mirrors the #13948 S-series shape (repo-task/v1, kind
feature_slicewithpayload.slice, progress on this issue at every boundary, PR against main with "Part of #14043", no closing keywords, the worker does not merge), routed on queuerepo-health-code-pilotto the laptop OpenCode lanes.repo-health:v1:slice:developing-today/code:issue:14043:slice-2repo-health:v1:slice:developing-today/code:issue:14043:slice-3repo-health:v1:slice:developing-today/code:issue:14043:slice-4repo-health:v1:slice:developing-today/code:issue:14043:slice-5repo-health:v1:slice:developing-today/code:issue:14043:slice-6All five read back as
queuedon the broker after enqueue (2026-11-24T05:26–05:27Z).Numbering note: the dedupe keys run slice-2..slice-6 because slice-1 is held by the completed design task 21648 and the packet validator requires the
slice-<k>key pattern. Each packet'spayload.slicecarries both numbers (number= key number,design_slice= the design's S-number,name= "Build S — …"), so the mapping above is also recorded inside every packet.Priority 40, and why: Drew prioritized this phase (comment 7121013819). Under the corrected semantics (higher number = LOWER priority), 40 sits above the general programme band at 70 and below the top actionable band at 20 — raised per Drew's explicit prioritization, not into the top band. Each packet's
priority_reasoncarries this.Dependency order, as packetised: S1 and S2 are independent. S3's packet requires S1+S2 landed; S4's requires S3; S5's requires S1–S4 landed and deployed plus the #13902 prerequisite. Following the #13948 S-series pattern, each dependent packet instructs its claiming session to verify the predecessors' state on this issue first and park naming the unmet prerequisite if one has not landed. On #13902: that issue's fix landed and it is closed (2026-11-23), so S5's prerequisite is already satisfied in substance; S5's packet still has the claiming session verify the deployed legs (broker accepts the signed decide, aggregator runs the applier, throat accepts a broker-raised alert) and park naming whatever is not live.
What could not be packetised exactly — named rather than invented:
pm-aggregator.actions-exec-apply-key", design §2). S1's packet carries that example name and instructs the slice to record the settled name on this issue if it differs. No other name was invented.answered_atwindow length. The design requires "a bounded window" (§2) without naming a duration. S1's packet requires enforcing a bounded window and tests an expiredanswered_at, but fixes no number — the slice settles it and records it here.cargo test -p fleet-queue), the design states S2–S4's done checks as unit tests without naming a runner. The packets carry the done checks as written and invent no command.Premise checks behind this record: this issue read in full (4 comments, count-confirmed); the design doc read from main; live queue lists (queued/parked/claimed/blocked, limit 300) checked for this issue before enqueue — no build packets existed; the only prior task is 21648 (design, done).
— Lane WRITEBACK-PACKETS, 2026-11-24.
dezren39 commentedon Nov 24, 2026
Lane code-i premise check for task 21655 (S3 applier loop, claimed 2026-11-24T05:26:48Z, lease to 09:26:48Z).
Design of record re-read in full (doc/2026-11-24_design_pm14043_answer_writeback.md §§1–7, 5 comments on the issue). S3 spec confirmed: new pm-stack/aggregator/src/actions-exec-apply.ts + wiring, answer_id state machine (pending/applied/superseded/rejected/failed), race table §3, double-tap guard, one-answer-path composition with #13469.
Prerequisite check: S1 task 21653 (broker signed decide envelope) status = claimed, not done/merged. S2 task 21654 (aggregator answer-to-handle mapping) status = claimed, not done/merged. Per the slice packet, S3 needs both S1+S2 landed first. Parking 21655 naming the unmet prerequisite; will re-claim once S1+S2 are done. No code changes made, no PR opened.
dezren39 commentedon Nov 24, 2026
oc-code-07 claim/premise checkpoint: I re-read #14043 and all 4 paginated comments (count confirmed). No same-slice build/landed record is present; the existing design record says S2 must first verify the raise stores the key. I am checking main-branch code and the current raise payload before implementation. The requested laptop transport is unavailable from this seat, so I am preserving the primary checkout and looking for an isolated, clean worktree route.
dezren39 commentedon Nov 24, 2026
Agent note — S1 claimed, premise checked (task 21653, lane oc-code-04)
dezren39 commentedon Nov 24, 2026
S2 premise verification (before implementation): on main at 7e28014,
build_extension_alert_bodyputssource: "fleet-actions-exec"andkey: info.keyon the incident;needsDrew.ledgerIdis alsoinfo.key. The aggregator intake parses/stores theneedsDrewextension separately:validateNeedsDrewkeeps ledgerId/question/context/options/links only, thenraiseNeedsDrew(..., parsed.value.source)stores the source but no key or handle. So the current question preserves source + ledger ID, but does NOT preserve key/handle. For the target Actions-exec producer, the key equals the ledger ID (actions-exec-ext:<handle>), so the handle can be safely resolved only after explicit mapping/storage is added; the design’s inferred key-preservation assumption is not true today.dezren39 commentedon Nov 24, 2026
S2 implementation checkpoint: the intake now passes the incident key into the needs-drew raise; raises persist a broker mapping only for source fleet-actions-exec with a non-empty actions-exec-ext: key, and the resolver returns a handle only for an answered question whose stored mapping validates. Added focused tests for broker and non-broker answers. Next: run focused verification and inspect the diff.
dezren39 commentedon Nov 24, 2026
Tests/proof checkpoint: the focused needs-drew write-back unit tests pass locally (2 tests, 7 assertions). The implementation is committed and pushed; dispatched the focused tests plus aggregator typecheck on Fleet Actions (run 45334082894), pending terminal result. No broader suite has been run.
dezren39 commentedon Nov 24, 2026
Lane oc-code-07 claim/premise checkpoint for queue task 21657 (S5 live proof, claimed 2026-11-24T05:27Z).
Premise verdict: proof legs NOT live. S1 (task 21653) claimed/in-progress, not merged. S2 (21654) claimed/in-progress, not merged. S3 (21655) parked waiting on S1+S2. S4 (21656) claimed, not done. Nothing in S1–S4 is landed, let alone Archer-deployed, so the deployed-leg verification (broker accepts signed decide, aggregator runs applier, throat accepts broker-raised alert) cannot pass and no live Actions exec session can be proofed. Per the slice packet, parking 21657 naming the missing legs; no code written, no PR opened.
Part of #14043.
dezren39 commentedon Nov 24, 2026
Agent note — S1 implemented + tested, PR ready (task 21653, lane oc-code-04)
dezren39 commentedon Nov 24, 2026
S2 verification update: the focused tests passed on the Fleet runner, but the first dispatched typecheck lacked installed aggregator devDependencies (
Cannot find type definition file for bun). I have rerun the same proof withbun install --frozen-lockfilebefore the focused tests and typecheck (run 45334882959); awaiting its terminal result. The initial failure was setup, not a test assertion failure.dezren39 commentedon Nov 24, 2026
S2 PR is open for Archer: #14105 (target
main, “Part of #14043”; no closing keyword). The focused tests and typecheck completed successfully in Fleet run 45334882959 after installing the aggregator lockfile dependencies; the Actions job is still finishing post-job cache cleanup. No merge performed.dezren39 commentedon Nov 24, 2026
Lane oc-code-06 premise checkpoint for task 21657 (S5 live proof, claimed 2026-11-24T05:57Z).
Fresh readback: #14043 has 15 paginated comments (count confirmed); design record PR #14046 is merged, and the main-branch design document is present. #13902 is closed as done. S1 (task 21653) and S2 (21654) are queue-done, but their PRs #14104 and #14105 are still OPEN/unmerged. S3 (21655) and S4 (21656) remain CLAIMED. Therefore S1–S4 are not all landed, and no deployment record proves the signed decide, applier loop, or failure-alert path is live. The S5 live proof cannot run yet.
Per the packet, parking with a non-person resume condition: recheck after #14043 records S1–S4 merged and deployed; then verify the live broker/aggregator/throat legs before opening an Actions-exec session. No code or proof record changed; no PR opened.
Part of #14043.
dezren39 commentedon Nov 24, 2026
Lane oc-code-06 re-claim checkpoint for queue task 21655 (S3 applier loop, claimed 2026-11-24T05:57Z after park delay elapsed).
Re-verified: S1 task 21653 and S2 task 21654 are queue-done with PRs #14104 and #14105 OPEN/unmerged (confirmed in the latest readback on this issue). S4 (21656) still claimed, not done. S3's packet requires S1+S2 landed — implemented is not landed. Re-parking 21655 until #14043 records S1+S2 merged. No code written, no PR opened.
Part of #14043.
developing-today-fleet commentedon Nov 24, 2026
Amendment — client write queue, notification responses, rich question answers (Drew, 2026-11-24 00:28 CST)
Three of Drew's requirements land on this design. Recorded against the design of record (
doc/2026-11-24_design_pm14043_answer_writeback.md, PR #14046).1. The client half of the held queue — the join, stated explicitly. Writes, answers included, are saved in a durable client-side queue and reattempted until the server acknowledges them (recorded in full on #14107). The chain is: client write queue → edge intake / held queue (#13469) →
recordAnswer→ this design's applier. Two consequences the build must honour:answered_atbounded window (design §2) governs replay of the signed envelope; the applier's race table (§3) already reads a late answer against a settled or silence-approved session assupersededwith a note. Under the client queue that path stops being an edge case — it is a normal arrival pattern, and S5's proof should treat it as one.2. Notification responses are an answer-capture surface of this design. A push carries the question's standard responses as notification action buttons; a tap on one is an answer — captured under the same per-question token authority, entering the same
recordAnswerstream. The endpoint it came from (browser push, the Android app) makes no difference to handling (the delivery side is recorded on #14084). Custom responses cannot be typed into a notification action, so the notification also clicks through to a detail view that gathers the fuller answer and builds the context appropriate to the question. Both paths converge on the one ledger record; neither is a side channel, and the applier sees one stream either way — as design §1 already assumes.3. The question/answer schema generalises. Questions support per-question custom answers: answer types include checkboxes and radio; there is ALWAYS a custom free-text option alongside the standard options; and answering works per question or per set — a set answered as one submission, each answer still recorded under its own answer id. Converting a question from radio to checklist (checkbox) must work without error, and the answer data model must survive answer-type conversion losslessly — answers already recorded under the old type remain valid and readable after the conversion.
One tension flagged, not silently resolved. This design's broker envelope carries a single boolean — design §1: "The broker's decide verb does not learn about PM schemas. It keeps receiving
{handle, approve}". A checkbox answer to a broker-sourced question has no boolean meaning until a resolution rule exists. The schema work must therefore define, per answer type, how an answer resolves for broker-sourced questions (or restrict broker-sourced questions to types with a defined resolution), and say what the applier does with an answer that cannot resolve — the §4 pattern (a visible alert of its own, never a broker log line) is the shape to follow. The envelope itself does not change.Implications for the queued build slices 21653–21657 — scope notes only; the packets are not edited here (queue surgery is Archer's):
— Lane PM-OFFLINE-PUSH-AMEND, 2026-11-24.
developing-today-fleet commentedon Nov 24, 2026
Answer-flow ruling — staged needs-review → needs-user, send-back, triage metadata (Drew, 2026-11-24 00:37 CST)
Drew's taxonomy ruling on #14084 (recorded there in full) has an answer-flow half that belongs to this phase, because this phase owns how answers are captured and applied:
Staged flow, AI first. An answerable item — including a broker-sourced alert of the kind this phase's applier serves — lands in the needs-review stage first. The AI handles the review stage and decides whenever possible under Drew's standing decision posture, without escalating. Only an item that absolutely needs Drew escalates to needs-user (the class formerly named
needs-dreweverywhere in this stack — the rename is recorded on #14084) and is pushed to him."Send back" is a standard answer. Every needs-user item carries send back as one of its standard options. Choosing it is an answer like any other: recorded against the item under the same per-question token, and it returns the item to the needs-review stage to be decided there. For a broker-sourced alert, the applier then applies the review stage's outcome through the same exactly-once application path — send-back changes who decides, never the application machinery, and a sent-back item is never silently dropped.
Triage metadata on the needs-user presentation. An escalated item shows the number of issues blocked by its answer (for broker-sourced items: the sessions/decisions waiting on the decide) and supports priority setting, so Drew answers the highest-unblock items first.
Scope note for the queued slices (21653–21657; packets not edited): the applier slices consume recorded answers from this staged pipeline — an answer may now be an AI-stage decision, a Drew answer, or a send-back followed by an AI-stage decision. The exactly-once and failure-alert requirements are unchanged; the live proof (S5, task 21657) should exercise at least one send-back round trip on a broker-sourced alert.
The full ruling, including the push delivery configuration (immediate by default; user-set rate cap, grouping, and group reminders on the one preferences surface), is recorded on #14084.
— Lane PUSH-UNIFY-PACKETS, 2026-11-24.
Merge pull request #14104 from developing-today/queue/21653-14043-sig…
dezren39 commentedon Nov 24, 2026
Lane oc-code-04 claim/premise checkpoint for queue task 21656 (S4 applier failure alerts and retry, claimed 2026-11-24T09:27Z).
Premise verdict: prerequisite NOT met — parking without code.
Per the slice packet, parking 21656 naming the unmet prerequisite: S3 landed on #14043. No code written, no PR opened, no files touched.
Part of #14043.
dezren39 commentedon Nov 24, 2026
Lane any-n premise checkpoint for queue task 21657 (S5 live proof). Premise verdict: prerequisite NOT met, parking without code. S1 #14104 and S2 #14105 are MERGED (08:13Z). S3 (21655) and S4 (21656) have not landed, so the applier the proof depends on does not exist on main or in deployment. No PR opened. Re-check when #14043 records S3 and S4 landed and deployed. Part of #14043.
dezren39 commentedon Nov 24, 2026
Lane any-o claim/premise checkpoint for queue task 21656 (S4 applier failure alerts and retry, claimed 2026-11-24T11:01Z).
Premise verdict: prerequisite NOT met — parking without code.
Per the slice packet, parking 21656 naming the unmet prerequisite: S3 landed on #14043. No code written, no PR opened, no files touched.
Part of #14043.
developing-today-fleet commentedon Nov 24, 2026
Lane ITEM-WORK-92 claim/premise checkpoint for queue task 21657 (S5 live proof), claimed 2026-11-24T11:22:05Z as worker repo-worker-code, lane any-n.
Premise verdict: prerequisite NOT met — no proof run attempted, no code written, no PR opened.
Verified gate state (fresh reads, 2026-11-24 ~11:24Z):
parked, no PR. The applier the proof exercises does not exist on main yet.parked(not_before 2026-11-24T12:05:41Z), no PR.This matches the previous claim's verdict (comment 7128672779, 10:21Z); what changed since: nothing on the S3/S4 gates — both remain parked.
Action: task 21657 is being structurally dep-blocked on tasks 21655 and 21656 with dep-recheck, wake protocol in the task's progress.next naming all gates (S3 done + S4 done + deployment of the applier confirmed live). On wake, the claiming session re-verifies each leg per the packet (deployed broker accepts the signed decide, deployed aggregator runs the applier, broker-raised alert accepted by the throat) before running the proof.
Part of #14043.
dezren39 commentedon Nov 24, 2026
Lane oc-code-05 claim/premise checkpoint for queue task 21656 (S4 applier failure alerts and retry, claimed 2026-11-24T12:08Z).
Premise verdict: prerequisite NOT met — parking without code.
Per the slice packet, parking 21656 naming the unmet prerequisite: S3 landed on #14043. No code written, no PR opened, no files touched.
Part of #14043.
dezren39 commentedon Nov 24, 2026
Lane code-f claim/premise checkpoint for queue task 21656 (S4 applier failure alerts and retry, claimed 2026-11-24 ~13:38Z).
Premise verdict: prerequisite NOT met — parking without code, same gate the previous four lanes recorded.
pm-stack/aggregator/src/actions-exec-apply.tsabsent from main. S4's owned paths include that file, so implementing now would be against a nonexistent surface.Resume: #14043 records S3 landed → implement S4 on a worktree off ~/git/code, PR "Part of #14043", no closing keyword. Part of #14043.