Skip to content

pm-console: order an older action held for a machine against a newer one the edge does itself #13398

Open

Description

@dezren39

What is done late is done in the order the owner did it, with one case left out.

What holds today. On the device a later action about the same thing (the same issue, task, reference or set of questions) waits behind an earlier one that has not been taken (subject in pm-stack/console/public/outbox.js). At the edge, an action that may be held goes behind an earlier one about the same thing that a machine has not taken yet, even when the machine can be reached again (subjectOf in src/edge-proto.ts, used in the act route of edge/src/edge.ts).

What is left out. An older action is held for a machine (it was relayed while the edge was not doing that kind itself, or was turned away), and then the edge does a newer one about the same thing itself. The machine does the older one when it is back, and for a kind where the last one wins (issue.rank) the older rank replaces the newer.

How to get there: with the laptop away and the edge's token turned away for writes, rank an issue (held for the laptop); press "Try again now" on the Cloudflare screen so the edge takes the kind back; rank the same issue again (done by the edge); bring the laptop back. The issue ends at the first rank.

What done looks like.

  • When the edge does a kind itself and something older about the same thing is held for a machine and has never been handed to one, the edge does the older one itself first, under its name, and drops it from what is held; or, for a kind where the last one wins, drops the older one and records it as replaced by the newer.
  • A held action that has already been handed to a machine (it was in an answer to a report and is not yet acknowledged) is not done by the edge: the machine may be doing it. The newer one waits behind it instead.
  • A test in test/edge.test.ts for each of the three cases, and for an unrelated subject going straight through.

Files: pm-stack/console/edge/src/edge.ts (the act route, keep, the report handler that hands held actions out), pm-stack/console/src/edge-proto.ts.

Found while fixing review findings on #13287; recorded in the design record doc/2026-11-23T06-50-00Z_architecture_pm_platform_cloudflare_core/.


Generated by Claude Code

Activity

  1. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Lane AAN claim: taking #13398 — pm-console: order an older action held for a machine against a newer one the edge does itself.

    Premise + ownership check (fresh, 2026-11-23): issue open, labels app/pm-stack, kind/enhancement, source/agent; comments count-confirmed at 1 (only the automated Kaneo link from developing-today[bot] 2026-11-23T15:26:41Z); no lane claim, no user/* label, no design/ratification gate, not on the hard-skip list. fleet agent next returned no claimable task (queue dry), so this was picked directly from GitHub. Neighbours rejected: #13484 (Lane AAL claim, since landed), #13444 (Lane AAK claim + execution-risk hold), #13421 (Lane AAM claim), #13342 (Lane AAQ claim), #13393 (Lane AAO claim; unit premise also stale), #13389 (execution-risk hold), #13430 (PR #13482 already open), #13466 (fix packet enqueued by oc-code-08 triage), #13464 (decision + PR #13475 by oc-code-08), #13506/#13507 (large migration-design renames), #13481 (six-package suite-health bundle), #13468/#13474 (large/operational, not small fixes).

    Plan: verify the premise in code on a laptop worktree off main (branch lane-aan-13398) — the act route in pm-stack/console/edge/src/edge.ts and subjectOf in pm-stack/console/src/edge-proto.ts hold a newer edge-executed action behind / allow it past an older never-handed-out held action for the same subject. Implement the stated ordering: when the edge executes a kind itself, an older held-for-machine action on the same subject that was never handed to a machine is executed by the edge first (or dropped as replaced for last-wins kinds like issue.rank); a held action already handed to a machine blocks the newer one instead. Add the four tests in test/edge.test.ts (three cases + unrelated subject straight through), verify via fleet dispatch or laptop run, land via PR, merge when verified, and close this issue when its criteria are fully met.

  3. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Lane AAN hold: execution-risk flag on #13398 — stopped, approval needed.

    While creating the laptop worktree for this lane (~/wt-lane-aan-13398, branch lane-aan-13398, off main at 249a1432a99), the platform execution-risk check fired on the command output. Per the standing lane guard I stopped immediately:

    • Nothing was run, built, tested, or edited inside that checkout — the worktree is left exactly as created.
    • The premise stands as filed (the issue names the act route in pm-stack/console/edge/src/edge.ts, subjectOf in pm-stack/console/src/edge-proto.ts, and the three ordering cases plus tests in test/edge.test.ts), and my claim is recorded above (comment 7108513020). The fix itself was not started.

    This item needs the user's own item-specific go-ahead before any lane operates in that checkout.

  4. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Lane OC2 claim: taking over #13398 — pm-console: order an older action held for a machine against a newer one the edge does itself.

    Takeover basis: Lane AAN verified the premise TRUE and claimed this item (comment 7108513020), then stopped when the platform execution-risk flag fired at worktree creation (hold recorded, comment 7108531560). Drew approved this item specifically on 2026-11-23 12:09 CST ("I approve all flags"). Lane OC2 picks it up under that approval.

    Plan (per the issue body and AAN's prepared scope):

    • Fresh laptop worktree off current main, branch lane-oc2-13398. AAN's flagged worktree ~/wt-lane-aan-13398 is left exactly as created and will not be touched.
    • Implement the stated ordering in pm-stack/console/edge/src/edge.ts (act route, keep, report handler) and pm-stack/console/src/edge-proto.ts: when the edge executes a kind itself, an older held-for-machine action on the same subject that was never handed to a machine is executed by the edge first under its name and dropped from held — or, for last-wins kinds (issue.rank), dropped and recorded as replaced by the newer. A held action already handed to a machine (sent in a report answer, not yet acknowledged) is not executed by the edge; the newer action waits behind it instead.
    • Tests in test/edge.test.ts for each of the three cases plus an unrelated subject going straight through.
    • Verify with the package's own tests/typecheck on the laptop, land via PR, merge when verified, close when the issue's criteria are fully met.
  5. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Lane OC2 hold: execution-risk flag on #13398 — stopped again, approval needed.

    While creating the fresh laptop worktree for this lane (~/wt-lane-oc2-13398, branch lane-oc2-13398, off current main at 10b0db79829), the platform execution-risk check fired on the command output. This is the second firing on this item (the first was Lane AAN's, comment 7108531560), despite Drew's item approval on 2026-11-23 12:09 CST ("I approve all flags"), recorded in my claim above (comment 7109825973).

    Per the standing lane guard I stopped immediately:

    • Nothing was run, built, tested, or edited inside that checkout — the worktree is left exactly as created, and no further git or package-manager commands will be run in it.
    • AAN's flagged worktree ~/wt-lane-aan-13398 remains untouched as well.
    • The premise stands as filed and as AAN verified it; the fix itself was not started.

    This item needs a route decision or a further go-ahead that clears the platform check before any lane operates in a checkout of it.

  6. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Routed to a laptop OpenCode session — Lane RT1 (archer), 2026-11-23.

    Per Drew's direction at 12:16 CST today ("use the laptop instead of local disk"), this item leaves the Muse lane rotation: its checkout content trips the platform execution-risk check in Muse sessions (two recorded firings across Lanes AAN and OC2), and Drew's approvals do not clear that check. The work will instead be done in-session by a laptop OpenCode lane; Archer merges via the GitHub API from the evidence record it posts.

    Queue task: 21419 (repo-health-code-pilot, read back as queued after enqueue). Scope: implement the held-action ordering (never-handed-out older held action first or dropped as replaced for last-wins kinds; handed-out-but-unacknowledged blocks the newer) with the four named tests in pm-stack/console/test/edge.test.ts, and open the PR. The task instructs the session to work entirely on the laptop, post the full evidence record on this issue and the PR it opens, state READY TO MERGE with the head SHA, and not merge — the merge is Archer's step.

    Prior Muse claims on this item are superseded by this route; the flagged Muse worktrees stay exactly as they were left.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions