Skip to content

publish reports 'no sessions in scope' on a stale ledger instead of syncing #147

Closed

Description

@lukemaj

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.
  • Checked myself: Ran publish (no sessions) → sync → task show (sessions present) → publish (posted: fix(orchestration): accept user authority relayed by the parent agentsmd#278 comment 7106065993, toolboxmd/gitpix#34 comment 7106067320).

Acceptance criteria

  • publish on an unsynced ledger either syncs incrementally first or fails with a message naming sync, never "no sessions in scope".
  • A test covers a task whose sessions exist in native records but not yet in the ledger.

Non-goals

  • Changing attribution rules.

Blockers

None.

Activity

  1. lukemaj commented on Nov 23, 2026

    @lukemaj
    ContributorAuthor

    Implementation in #148 (head be51e5b2aff14a93caf767de92ac48a33909be63, v1.5.3).

  2. lukemaj commented on Nov 23, 2026

    @lukemaj
    ContributorAuthor

    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.

  3. added a commit that references this issue on Nov 23, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions