You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
publish reports 'no sessions in scope' on a stale ledger instead of syncing #147
What:publish (and task show) bring the ledger up to date before deciding a task has no sessions, or say the ledger is stale and to run sync. Why: On 2026-11-23 publish --task toolboxmd/agentsmd#278 and --task toolboxmd/gitpix#34 both returned "nothing to publish: no sessions in scope"; after sync, the same tasks showed 36 and 71 attributed responses (at least $1.35 and $4.31) and published fine. So what: An agent changes publish's stale-ledger behavior; delivery agents then stop posting "no cost" notes on PRs that did cost money.
Elon record
Requirements and who asked: The user asked why PR #278 had no cost comment; AgentsMD delivery requires posting the cost before claiming a PR ready.
Deleted: Adding a "run sync first" line to every caller's instructions; the tool owns its freshness.
Bottleneck:publish treats an unsynced ledger the same as a task with no work.
Implementation in #148 (head be51e5b2aff14a93caf767de92ac48a33909be63, v1.5.3).
Design: the preferred sync-before-publish was measured and rejected: back-to-back incremental agent-observer sync on bestia took 4m25s and 8m28s, and sync needs the writer lock (trace, interventions, intervention show and sessions open the ledger read-write #73). publish and task show stay read-only and exit 2 with a message naming agent-observer sync.
Red run (before fix), tests/test_t3.py::StaleLedgerTest on 2a5d2c2 plus the test: publish stderr nothing to publish: no sessions in scope; task show stderr 'unknown task: example/alpha#7'.
Green: the same test passes; python3 -m unittest discover -s tests 966 OK; versionctl release-check OK.
Review round 1 on be51e5b failed: task show exited 0 with no hint when the T3 link was synced before its transcript (finding). Fixed in dbb02dfa1cc5121909f15ae41dd591c8f56ca900: task show prints the sync hint and exits 2 for a known task with no sessions. Red run before the fix: test_unsynced_transcript_names_sync_then_resolves_after_sync (args='task')AssertionError: 0 != 2. Full suite 967 OK; release-check OK (v1.5.3). Round 2 review next.
Activity
lukemaj commentedon Nov 23, 2026
Implementation in #148 (head
be51e5b2aff14a93caf767de92ac48a33909be63, v1.5.3).agent-observer syncon bestia took 4m25s and 8m28s, and sync needs the writer lock (trace, interventions, intervention show and sessions open the ledger read-write #73).publishandtask showstay read-only and exit 2 with a message namingagent-observer sync.tests/test_t3.py::StaleLedgerTeston 2a5d2c2 plus the test:publishstderrnothing to publish: no sessions in scope;task showstderr'unknown task: example/alpha#7'.python3 -m unittest discover -s tests966 OK;versionctl release-checkOK.fix: name sync when task show finds a known task with no sessions (#147)
lukemaj commentedon Nov 23, 2026
Review round 1 on be51e5b failed:
task showexited 0 with no hint when the T3 link was synced before its transcript (finding). Fixed indbb02dfa1cc5121909f15ae41dd591c8f56ca900:task showprints the sync hint and exits 2 for a known task with no sessions. Red run before the fix:test_unsynced_transcript_names_sync_then_resolves_after_sync (args='task')AssertionError: 0 != 2. Full suite 967 OK; release-check OK (v1.5.3). Round 2 review next.Merge pull request #148 from toolboxmd/fix/147-publish-stale-ledger