Skip to content

journal: carried next steps carry their age; the carry is bounded and announces what it withheld - #1011

Merged
laynepenney merged 1 commit into
devfrom
fix/984-carry-forward-aging
Aug 26, 2026
Merged

journal: carried next steps carry their age; the carry is bounded and announces what it withheld#1011
laynepenney merged 1 commit into
devfrom
fix/984-carry-forward-aging

Conversation

@laynepenney

Copy link
Copy Markdown
Member

Ref #984 — closes at promotion.

What changes

The carry-forward retirement predicate stays exact (a near-miss never retires; a wrongly retired step is gone, a stale one is at least visible). What changes is what a reader can see:

  • each carried step is stamped [carried since YYYY-MM-DD] with the date of the entry it was first written in; the stamp is preserved, never refreshed, on later carries; done matching ignores the stamp, so a carried step retires whether its text is listed bare or stamped
  • at most 20 carried steps are kept on a new entry; the rest are withheld and a final [carry bound] N carried steps withheld; oldest since … line announces it; the marker is never itself carried, and action=pending skips it
  • the write confirmation always prints Carry-forward: N carried, M retired by done, K withheld. (zeros included, so a filter that retired something never renders like one with nothing to do; this was Atlas r1's finding on v1) and, when anything is carried, how to retire a carried step: list its exact text under done
  • merge_carried_forward_with_report returns the list plus a CarryReport; merge_carried_forward_next_steps remains as a back-compatible wrapper; the MCP and CLI write paths use the report form

Evidence (all runs with PYTHONPATH pinned to this checkout; import path printed)

  • affected suites (test_cli, test_journal, test_resume, test_journal_collapse, test_server_resume): 223 passed
  • full suite: 3140 passed, 10 failed; 9 of the 10 fail identically on an origin/dev base worktree (CrewAI and Google ADK adapters need an embedder / ADK install; one entry-point discovery), the tenth was a legacy expectation moved in this PR and now passes
  • ruff 0.15.12 on the six touched files: 33 findings on origin/dev, 33 on this branch, delta zero, none on changed lines (an earlier draft of this body said 30/30; that count covered five files, before test_cli.py joined the change, and was caught in review)

Deliberately not done

The predicate is not loosened (substring or token overlap), per the issue's own caution. No schema change: the stamp lives in the step text so every existing reader renders the age with no code change.

Premium boundary: recall is OSS (journal storage and rendering); no boundary change.

Reviewers: r1 Atlas, r2 Sentinel.

… announces what it withheld

Ref #984 — closes at promotion.

The carry-forward retirement predicate is exact by design and stays exact: a
near-miss must never retire (a wrongly retired step is gone, a stale one is at
least visible). What changes is what a reader can see. Each carried step is
stamped [carried since YYYY-MM-DD] with the date of the entry it was first
written in, and the stamp is preserved rather than refreshed on later carries.
At most 20 carried steps are kept on a new entry; the rest are withheld and a
final marker line says how many and the oldest date, so the bound is visible
instead of silent. The marker is never itself carried or served as pending.
The write confirmation always reports what the filter did (carried, retired by
done, withheld), zeros included, so a filter that retired something and a filter
with nothing to do never render identically; when anything is carried it also
says how to retire a carried step: list its exact text under done.

Tests: seven new cases (stamp once, retire by bare or stamped text, near-miss
does not retire, bound with announced withheld and marker not re-carried,
pending skips the marker, confirmation reports counts, counts render even when
nothing is carried); five existing expectations moved to the stamped contract.

Co-Authored-By: Claude <noreply@anthropic.com>
@laynepenney
laynepenney merged commit e20769a into dev Aug 26, 2026
11 of 12 checks passed
@laynepenney
laynepenney deleted the fix/984-carry-forward-aging branch August 26, 2026 19:23
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant