Skip to content

Morrow test world; 25 laws over it; fault points; defects the laws found - #6315

Merged
Sinity merged 7 commits into
masterfrom
lane-morrow
Oct 19, 2026
Merged

Sinity merged 7 commits into
masterfrom
lane-morrow

Conversation

@Sinity

@Sinity Sinity commented Oct 19, 2026

Copy link
Copy Markdown
Owner

The Morrow example archive is now a shared test world built through the real import path, and the laws blocked on it run against it (Bead plnext-ony.13.7).

Fixture. examples/morrow/ holds the example's provider files (from the spec repo, polylogue-spec/examples/archive). The new polylogue-testkit crate lays them out where each tool writes, converges the engine and imports the exports. Tests compare view() (every session's export document) and stored_bytes() (an input read back through the blob store). Two generator artifacts were corrected in the fixture, as examples/morrow/README.md records: a Codex item ID reused across #5 and #6 with different text, and hook carrier lines whose key order no real carrier has.

Laws now tested

  • Engine, over Morrow: L8 (raw bytes survive the source), L10 (identity stability), L22 (a corrupt blob fails its read), L30 (one subagent parent, also through a symlink), L34 (compaction keeps the tree connected), L41 (pieces reassemble exactly), L64 (rebuild leaves one index; the INDEX_VERSION part needs a test-only setting), L115 (host rename; the device-number part not tested).
  • Query, over Morrow: the spec's 38 examples (26 match; 12 listed as gaps with reasons, failing the test if they start to match), L76 (count equals rows paged), L129, L132, L133, L137.
  • With the test-only faults feature (polylogue_store::fault, never enabled by a shipped build): L7 (a failed write at the archive commit, between the commits or at the index commit loses nothing), L45 (store part: a failed read is an error), L63 (a panicking parser loses only its input and is not retried until its bytes or parser change). xtask check runs them as a second step.

Defects the laws found, fixed here

  • A subagent's root task was counted as a human prompt; PromptKind::Model marks text another model wrote (also peer messages); a compaction call's root prompt is harness text.
  • on_active_path was never written, so a ChatGPT chat's abandoned branch read as active; the writer derives it from the newest active_leaf.
  • Links were stored with the model's kind as both kind and how; they are now subagent|continuation plus how, so links where kind:… and link:fork answer.
  • A fork-context-ref made a second, fork, parent for a subagent (L30).
  • Codex's git.repository_url was never read (Session.repo), so repo: matched nothing; a code-mode child call is exec_command (shell) and the exec wrapper is action code.
  • A child naming a split response's later record, or an event record, as parent pointed at no message (L34); the Claude Code parser now resolves those uuids.
  • Three-valued logic: NOT model:… matched sessions whose model is unknown; repo:unknown searched for a repository named "unknown".
  • A parser panic was not caught at all (L63); a failed input was retried on every pass.
  • In workspace builds the Sinex crates turn on serde_json preserve_order, which changed 7 golden outputs; golden files are compared as values and written sorted, and the ChatGPT parser orders timeless messages by the tree's children walk instead of the mapping's key order.

Index version 7 (link pairs, session repo, active path). One defect is filed rather than fixed: kind:* where exists … answers wrongly (plnext-tuu.7).

Verification: cargo run -p xtask -- check passes on the rebased tree, 278 tests including the fault laws.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em

Sinity and others added 7 commits October 19, 2026 07:01
…mport

The example files from the spec move into examples/morrow/, and
polylogue-testkit lays them out where each tool writes, converges the engine
over them and imports the exports. Building it found three defects, fixed:

- A subagent transcript's root record is the task its parent model wrote;
  it was counted as a human prompt. PromptKind::Model marks text another
  model wrote (also a peer agent's message), stored written_by = model.
- on_active_path was never written: a branched chat's abandoned branch was
  read as active. The writer now marks the path from the newest active_leaf
  to the root after each batch.
- The example's #6 reused #5's Codex item ID with different text, hiding
  #5's first prompt; the fixture's copy is renamed (examples/morrow/README.md).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
…epo and code mode

The spec's 38 query examples now run against the Morrow archive built by
the parsers and writer (daemon/query/morrow.rs): 26 match, and the 12 that
wait on unbuilt features are listed with the reason and fail the test if
they start to match. Every example's count equals its rows paged (law 76).

Running them found defects, fixed here:
- Links were stored with the model's kind name as both kind and how
  (copy/copy); the table and query language use subagent|continuation with
  how. LinkKind maps to and from the stored pair, so links where
  kind:continuation and link:fork answer.
- A Claude Code fork-context-ref made a fork link, giving a subagent two
  parents (law 30); it is evidence for the subagent link and its branch
  point.
- Codex's repository URL was never read: Session gains repo, filled from
  session_meta git.repository_url, so repo: matches.
- A code-mode script's child call was named command_execution with action
  other; it is exec_command (shell), and the exec wrapper is action code, so
  the wrapper rule counts the children in its place.
- A compaction call's root prompt is the harness's instruction, not a
  model's task.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
…ted tree, pieces, rebuild, host rename

Eight laws now run on the Morrow archive built by the real loop
(crates/engine/tests/morrow_laws.rs): L8, L10, L22, L30, L34, L41, L64 (in
part) and L115 (host part). They found two defects, fixed:

- L34: a Claude Code response written as several records keeps the first
  record's uuid, so a child naming a later record's uuid as its parent
  pointed at no message. The parser now maps a split response's later
  uuids, and event records' uuids (compaction boundaries through
  logicalParentUuid, attachments, progress), to the message they belong
  under.
- L41: the example's hook carriers were never collected; their generator
  put provider/session_id/proc before event_id, which no real carrier does.
  The fixture's lines now lead with the event fields (examples/morrow/README.md).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
…bound once, closed sets

L129, L132, L133 and L137 run on the Morrow archive. L132 found that a
condition on a session's model matched its NOT when the model was unknown
(claude.ai #8), and that repo:unknown searched for a repository named
'unknown'; both are three-valued now. A 'kind:* where …' prefix answering
wrongly is filed as plnext-tuu.7.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
…map order isolated

- polylogue_store::fault: points a test arms to fail or panic, compiled to
  nothing without the faults feature, which nothing shipped enables. Points
  at the writer's archive commit, between its two commits, at its index
  commit, at reads and before each parser step.
- Law 7: a failed write at any of those steps, after 0-3 earlier writes,
  converges on restart to the uninterrupted view with every input byte for
  byte. Law 45 (store part): a failed read is an error. Law 63: a parser
  panic is caught and becomes that input's failure; other inputs are built;
  an unchanged failing input is not tried again; a change parses it.
- xtask check runs them as a second step; the boundary check allows the
  testkit and rusqlite as dev-dependencies only.
- The full suite failed 7 golden cases in workspace builds: the Sinex crates
  turn on serde_json's preserve_order. Golden files are compared as values
  and written with sorted keys; the ChatGPT parser, which ordered timeless
  messages by the mapping's JSON key order, now uses the tree's own order
  (a walk through children).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AcQETkbTfFMr1hgNJ8A3em
@Sinity
Sinity enabled auto-merge (squash) October 19, 2026 05:06
@Sinity
Sinity merged commit 4887aec into master Oct 19, 2026
1 check passed
@Sinity
Sinity deleted the lane-morrow branch October 19, 2026 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant