test(infra): restore archive clone harness contracts - #3883
Conversation
Shared archive templates carried durable bootstrap identity for the template path into private clones, causing valid facade tests to fail during startup reconciliation. Rebind the bootstrap receipt after cloning and cover the cloned archive through the real ArchiveStore route.\n\nThe embedding stats contract mock also ignored bound SQLite parameters after the shared introspection refactor, so every table probe appeared present. Inspect the bound table name and preserve the intended legacy fallback assertions.\n\nVerification: devtools test selected seven focused regression cases, all passed.
Record the two current-master harness regressions discovered while validating polylogue-mn0si. The scoped Bead binds the clone identity and embedding-stat fixture behavior without absorbing the unrelated full-suite residual population.
|
Warning Review limit reached
Next review available in: 34 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR updates test infrastructure for archive cloning and embedding statistics. Clones now receive fresh durable identity metadata. New regression coverage checks source preservation and clone opening. The sqlite metadata mock now reads table names from query parameters. ChangesTest contract repairs
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 896b79fec9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| {"_type":"issue","id":"polylogue-fs1.5","title":"Export: Atropos/eval JSONL downstream of the canonical archive","description":"Convert archived Hermes (and other agent) sessions into Atropos-compatible eval/RL trajectories: canonical archive -> eval JSONL, NOT bespoke snapshot->export (that shape is a one-off parser and duplicates Hermes's own NeMo Relay). Round-trip through Nous's jsonl2html.py viewer as the acceptance check. Generalizes to the training-flywheel story: longitudinal trajectories with structural outcome labels + human judgments.","design":"Downstream export only: canonical archive session -> Atropos/eval JSONL (trajectory = messages + tool calls + structural outcomes + terminal state). VERIFY the current Atropos trajectory schema in NousResearch/atropos before freezing field names; round-trip the output through their jsonl2html.py viewer as the acceptance check. Implementation home: a render/export profile over the read substrate (like read-package layouts), not a script silo. Selection is a normal query ('find ... then export --format atropos'), so any slice of the archive (by origin/repo/outcome) can become an eval set. Prior prototype existed (hermes-forensics.zip, earlier session) — treat as reference only.\n\nTRAINING-FLYWHEEL DIRECTIONS (fables interop analysis — the most original bridge; nobody currently connects personal agent archives to the open-model training loop): (a) fine-tuning corpus — outcome-labeled, judgment-filtered trajectories for training personal model variants on one's own successful workflows; the assertion judgment gate doubles as the data-quality filter (only human-accepted work patterns qualify), structural outcomes (exit codes, terminal states) select success without trusting self-report. (b) pathology taxonomy -> eval environments: agent_hanging, question_left, thrash-loop signatures mined from real work as seed material for Atropos-style RL/eval environments, reproducible via the synthetic corpus so the environments are shareable without private data. Both are downstream projections of the same export lane — build the lane once, add selection/filter profiles.","acceptance_criteria":"`polylogue-fs1.5` emits an export/interchange artifact that preserves stable object refs, evidence provenance, caveats, and content hashes. A roundtrip or consumer fixture proves no duplicate facts and no silent loss of missing/private blobs. Verification artifact: OriginSpec detector/parser/fixture/fidelity suite and content-hash export/import roundtrip.","notes":"CORPUS CORRECTIONS (2026-07-06 review pass): (1) VERIFY the live Atropos schema at implementation time — it is a moving framework with recent format fixes around nested messages; pin the schema version + round-trip a validator/renderer (jsonl2html) as a mandatory test. (2) Corrections are SESSION-SCOPED => weak supervision, not fine-grained ground truth: any reward/eval report MUST carry base rate, n, correction granularity, and coverage. (3) Export is a pure read projection — no write path. Verbatim spec: .agent/handoffs/polylogue-gpt-pro-2026-07-06/bundles/rnd-bundle-1-of-6.md L1675.\n2026-07-06 D07 rerun landed (on-brief; preserved as corpus-gpt-pro-2026-07-06/DR2-07-rl-eval-environment.md). Design it settles and this bead adopts: (1) first export target = atropos-eval-jsonl profile (messages + scores is viewer-compatible immediately); NOT Harbor/Terminal-Bench (heavy task materialization), NOT SWE-bench (patch-centric), NOT OpenAI Evals (deprecation path late 2026), NOT ATIF (observability carrier, no reward semantics — stays an IMPORT format on fs1.2). (2) Three-way reward split is the core honesty contract: recorded_reward (derived from archived evidence, e.g. verify exit_code=0), replay_spec (git SHA, workspace snapshot ref, env manifest, network policy, timeouts), checkable_reward (null until replay actually reruns the verify command). Never conflate recorded with checkable. (3) Field mapping keys on existing evidence — tool_result_is_error, tool_result_exit_code, verify command text+cwd, git SHA, user.db corrections as session-level weak supervision (do NOT invent step-level labels), keystone evidence_ref back to the archive. NO fabricated tokens/masks/logprobs — that lane exists only after a replay substrate exists. (4) Highest-value slice: CI-passing sessions with an explicit verify command + stable git SHA — the verify command IS the seed of a rerunnable reward function.\n[Delivery upgrade 2026-07-07T00:05:00Z] Release=K-interop-origin-export; lane=origin-interop-export; readiness=D-horizon-ready; proof=OriginSpec detector/parser/fixture/fidelity suite and content-hash export/import roundtrip. Original readiness=E-spec-needed.\nDeferred (no new code) -- genuinely new export feature, not a composition of already-existing primitives like fs1.4 turned out to be.\n\nThe bead's own 2026-07-06 D07 rerun notes already settle the design in detail (atropos-eval-jsonl profile; three-way recorded_reward/replay_spec/checkable_reward split with checkable_reward null until a real replay substrate exists; field mapping keyed on tool_result_is_error/tool_result_exit_code/verify command text+cwd/git SHA/user.db corrections as session-level weak supervision). That design is sound and directly implementable -- I did not find a reason to defer on design grounds. The reason for deferring in THIS pass is time/verification-surface budget: this cluster's frontier work (fs1.7/fs1.2/fs1.11, PR #2876) plus honest investigation of fs1.4/fs1.8/fs1.13/ox0 consumed the available session budget, and I judged rushing a new JSONL export format + roundtrip fixture without adequate test depth to be worse than an honest deferral with the design already fully specified.\n\nNo code written. The settled design above (also visible verbatim in this bead's own notes) is ready for direct implementation by the next agent without further research: highest-value slice = CI-passing sessions with an explicit verify command + stable git SHA (the verify command is the seed of a rerunnable reward function).\n[2026-07-18, res-01 deep-research finding, GPT-Pro wave-2] External deep-research memo (mission: .agent/handoffs/external-agent-campaigns/2026-07-17-gpt-pro-wave-2/missions/res-01-atropos-tinker.md; deliverable at /realm/inbox/download/deep-research-report.md, access-dated 2026-07-17) confirms and dates this bead's own 2026-07-06 D07 design decision rather than overturning it: NousResearch/atropos is now ARCHIVED and read-only as of 2026-07-04 (last tagged release v0.4.0 2026-03-10, last visible main-branch merge 2026-03-27) -- do not treat it as a stable first-class external contract. The live Atropos API transport is the `ScoredData` Pydantic model at `/scored_data` (README prose says \"ScoredDataGroup\" but the enforced server shape is `ScoredData`), now including optional `distill_token_ids`/`distill_logprobs` distillation arrays (Tinker only supports K=1). `tinker-atropos` is a real Atropos-to-Tinker LoRA training bridge but requires per-item `tokens`, `scores`, and `inference_logprobs` -- it does NOT ingest Hermes `state.db` or raw transcripts directly, so \"import history -> train a small delta\" is NOT true for arbitrary historical archives without a token-faithful reconstruction layer this bead does not have.\nRecommendation this bead should adopt: sequence contracts as ATIF-v1.7 first (normalized, versioned, externally documented trajectory contract -- already the fs1.2 IMPORT format, consistent with this bead's own note that ATIF \"stays an IMPORT format on fs1.2\"), ATOF-0.1 as preferred raw input when available, and Atropos/tinker `ScoredData` export only as an OPTIONAL derived adapter gated on real token/logprob availability -- never market Hermes `state.db` alone as sufficient for a tinker-atropos training path. This directly reinforces (does not replace) the existing D07 three-way recorded_reward/replay_spec/checkable_reward design and the \"atropos-eval-jsonl profile (messages+scores, jsonl2html-viewer-compatible)\" as the right FIRST export shape -- it is narrower than full Atropos `ScoredData` and does not depend on the archived repo's continued maintenance. Local falsifier proposed by the memo: try to populate `tokens`+`inference_logprobs` from a real Hermes `state.db` + ATIF sample without model reruns or fabrication -- if that fails (expected), keep the Atropos/tinker export gated as a second-stage adapter, not the canonical target.\n[Verification sweep 2026-07-31, bead-landing-check group5] Verdict: LIVE. Notes explicitly: \"Deferred (no new code)... No code written.\"","status":"open","priority":4,"issue_type":"feature","owner":"ezo.dev@gmail.com","created_at":"2026-07-03T04:31:42Z","created_by":"Sinity","updated_at":"2026-07-31T22:35:43Z","labels":["area:ingest","area:query","area:substrate","delivery:K-interop-origin-export","delivery:ac-patched","lane:origin-interop-export"],"dependencies":[{"issue_id":"polylogue-fs1.5","depends_on_id":"polylogue-fs1","type":"parent-child","created_at":"2026-07-03T06:31:41Z","created_by":"Sinity","metadata":"{}"},{"issue_id":"polylogue-fs1.5","depends_on_id":"polylogue-fs1.1","type":"blocks","created_at":"2026-07-03T06:31:42Z","created_by":"Sinity","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0} | ||
| {"_type":"issue","id":"polylogue-fs1.4","title":"Report: polylogue forensics for Hermes sessions","description":"Five-section per-session/per-corpus report, computed from the canonical archive (composition over existing primitives where possible): 1) session topology — parents, resumes, compactions, subagents, branches, long turns; 2) LLM/request economy — token lanes, cost, retry/fallback causes, model/provider shifts, cache-read amplification; 3) tool execution profile — durations, failures, approvals, repeated calls, parallel groups; 4) failure patterns — loops, stalls, empty-response retries, repeated shell failures, truncation, compaction-induced loss, reasoning burn; 5) local causal footprint — git diff/commits, commands, files, build/test runs. The 2-minute demo artifact (sanitized sessions, one command, README section) is the campaign-grade packaging of this report.","design":"Composition first: sections 1-3 and most of 4 should lower onto existing primitives — get_session_topology/logical session (topology), session_provider_usage_events + cost rollups (economy), actions/tool timing (tool profile), pathology detectors + structural outcomes (failure patterns), session_commits/git correlation (footprint). Only add new detectors where Hermes-specific (loop detection over repeated identical tool calls; stall = long gap between spans; reasoning burn = reasoning-token share per turn). Surface: a named read view/report profile (`polylogue forensics hermes --session <id>` or read --view forensics), rendered markdown + JSON. Demo packaging: sanitized fixture sessions, one command, <2min, README section — that packaging is a legitimate one-off; the five sections' facts must be query-composable (capabilities-not-silos rule).","acceptance_criteria":"A Hermes forensic report regenerates from imported Hermes sessions and emits citable findings with coverage/fidelity caveats, raw evidence refs, and a single documented regeneration command. The report includes at least one happy-path fixture, one missing-field/degraded fixture, and one fidelity limitation that renders visibly instead of silently disappearing.","notes":"Executable upgrade (2026-07-04 sidecar):\nClassification: blocked on polylogue-fs1.1 for real Hermes state.db ingestion, but the report contract can be made executable now against synthetic/fixture sessions and later rerun on real Hermes rows.\nProduct question: can Polylogue produce a cold-reader forensic report that explains one Hermes/agent session better than the runtime itself, using canonical archive facts rather than a silo export?\nLikely modules/surfaces: read/query surfaces under polylogue/cli/read or command inventory, session topology/logical-session APIs, session_provider_usage_events/cost rollups, actions/tool timing readers, git/local footprint helpers, demo fixture/scenario generators, docs/demo shelf. Prefer a named report/read view that composes existing primitives; avoid a Hermes-only data path.\nArtifact shape: markdown + JSON report with the five existing sections, each section carrying source_refs/query names and missing-data caveats. Demo package must include sanitized fixture/session id, one command, expected runtime under 2 minutes, and a README snippet.\nAcceptance detail: for fixture data, each section has at least one asserted fact and one source reference; for missing Hermes fields, the report emits explicit unavailable/caveat rows rather than prose guesses; once fs1.1 lands, rerun against a real Hermes session and record diff between fixture and real coverage.\nVerification commands: focused unit/visual/demo command for the report surface, plus devtools render all --check if docs/README/demo surfaces are touched. If the implementation adds a new CLI command or view, verify command inventory and generated docs through devtools render all.\n[Delivery upgrade 2026-07-07T00:05:00Z] Release=K-interop-origin-export; lane=origin-interop-export; readiness=A-implementation-ready; proof=OriginSpec detector/parser/fixture/fidelity suite and content-hash export/import roundtrip. Original readiness=C-needs-acceptance-criteria.\n[Prework packet 2026-07-07] Static execution packet (anchors, mechanism, plan, tests, verification): .agent/handoffs/polylogue-gpt-pro-2026-07-07/prework-v2/task_packets/105_polylogue_fs1_4.md (depth: bead-localized-from-export; urgency: T2-foundation-before-feature-proof). Generated from master @ 8a975a40 2026-07-06 — verify source anchors before coding; line numbers are snapshot-relative.\n2026-07-10 integration-demo refinement: fs1.12 consumes this report. Include a claim-vs-tool-evidence canary with supported, contradicted, and unknown states; every displayed conclusion must resolve to structured tool outcome evidence and a fidelity caveat, not agent prose.\n2026-07-10 Nous follow-up technical refinement: use an evidence-status taxonomy that distinguishes supported, contradicted, later repaired/reversed, externally uncheckable, and unverifiable because required evidence was not retained. Preserve temporal ordering and evidence-retention caveats so later success cannot launder an earlier contradicted claim. Reuse the general claim-vs-evidence/claims-ledger substrate; do not create Hermes-only verdict semantics.\nDeferred (no new code) -- investigated and found the design's own preferred shape (\"composition first... avoid a Hermes-only data path... only add new detectors where Hermes-specific\") is already substantially satisfied by existing generic primitives, verified by reading their source (not assumed):\n\n- Section 1 (session topology): get_session_topology / logical session APIs -- already exist, origin-agnostic.\n- Sections 2-4 (LLM/request economy, tool execution profile, failure patterns): polylogue/insights/postmortem.py's compile_postmortem_bundle. Verified it is 100% origin-agnostic (SessionProfile.origin is a plain string field, zero origin-conditional branches in the aggregator) and already produces cost/token-lane metrics, tool-category profiles, and pathology-detector failure_mode/wasted_loop fields with evidence refs and honest degraded-not-fabricated behavior for missing signal (test_compile_postmortem_bundle_degrades_without_signal already covers this generically).\n- Section 5 (local causal footprint): polylogue/insights/session_commit.py's detect_session_commits -- git-commit attribution via time-window + file-overlap scoring, already exists, origin-agnostic.\n\nWhat's genuinely missing, and why I did not build it this pass: (a) a NAMED regeneration surface (a `polylogue forensics hermes --session <id>` command or `read --view forensics`) unifying these existing primitives under one command -- mechanical but real work that triggers the CLI-inventory/devtools-render-docs cascade; (b) the claim-vs-tool-evidence canary / evidence-status taxonomy the bead's own 2026-07-10 refinement explicitly says to build on \"the general claim-vs-evidence/claims-ledger substrate\" -- that substrate does not exist yet, so building Hermes-only verdict semantics here would violate the refinement's own instruction not to invent parallel machinery.\n\nDid not add a redundant \"hermes-flavored\" test of compile_postmortem_bundle: since the aggregator has zero origin-conditional logic, a test asserting it also works with origin=\"hermes-session\" would be vacuous (guaranteed to pass, proves nothing a mutation could break that the existing origin-agnostic tests don't already cover).\n\nRecommend: a follow-up scoped narrowly to (a) the CLI/read-view wiring only, composing the primitives above with zero new detector logic -- and treat the claim-vs-evidence canary as blocked on its own substrate bead, not this one.\n2026-07-18 (Claude Sonnet, branch feature/fix/hermes-atof-remaining-gaps): landed the verification-coverage correlation primitive that Phase 3's verification-ledger import (wj25) unblocked -- polylogue/insights/hermes_verification_coverage.py, a pure aggregator (no I/O) summarizing one Hermes session's verification_evidence.db coverage: structural event outcomes, final status, changed_paths, honest available=False (not fabricated) when no verification evidence exists. Also added hermes_verification.hermes_verification_session_id_for mirroring hermes_spans's existing observer-correlation helper. Verified via real archive ingestion (LiveBatchProcessor), not hand-built fixtures. 3/3 tests, devtools verify --quick green.\n\nDid NOT attempt in this pass, per this bead's own prior 2026-07-14 finding that sections 1-4 are 'substantially satisfied by existing generic primitives' and the recommended narrow follow-up is 'the CLI/read-view wiring only': the named CLI regeneration surface (read --view forensics or similar), the per-corpus aggregate ('sessions ended with failing/absent verification'), the 2-minute demo package (sanitized fixtures, one command, README section), and MCP tool wiring. This was a deliberate scoping decision given session budget, not an oversight -- the correlation primitive was the one piece genuinely blocked on Phase 3 landing first; the rest is composition/wiring work that deserves its own focused pass (CLI read-view registration triggers the docs-render cascade per this repo's own gotchas list).\n2026-07-18 merge: PR #3120 squash-merged to master as b563083188926b2078965ea41c2028a0a305577e. Verification-coverage correlation primitive (hermes_verification_coverage.py) is now live on master. Bead stays open: named CLI/read-view surface, per-corpus aggregate, 2-minute demo package, and MCP wiring remain undone per this pass's explicit scoping decision (see prior note).\n[Verification sweep 2026-07-31, bead-landing-check group5] Verdict: LIVE. Substantial composition-based delivery (PR #3120 verification-coverage correlation) but explicit remaining scope: named CLI/read-view surface, per-corpus aggregate, demo package, MCP wiring - \"deliberate scoping decision... not an oversight.\"\nUNBLOCKED 2026-07-31 (polylogue-pbuh/cijx.1 residual pass, worktree agent-aaffe89902b670d4b): the session->PR producer+reader chain this bead depends on is now real. session_refs carries typed pull_request evidence (18,949 rows live), and PR #3425 (merged 5525446a2) wired `read --view correlation` / Polylogue.session_correlation_payload to consume it as authoritative over the old regex/time-window heuristics, with disagreements surfaced rather than silently guessed. Verified live against /realm/db/polylogue/index.db (read-only) that the CLI path resolves real typed PR refs end-to-end (also fixed a pre-existing NameError in that path's GitHub-enrichment branch that had never been exercised with real refs before this pass). Full detail: polylogue-cijx.1 and polylogue-pbuh notes, 2026-07-31.\n\nNOT closed by this alone: this bead's own AC still needs its specific deliverable (see this bead's own description) beyond \"the correlation data is now readable\" -- that implementation work was not attempted in this pass (out of its declared scope: read-surface residual verification for pbuh/cijx.1 only). Re-triage this bead's own AC against the now-working session_commit.py/correlation_view.py surface when picked up next.\n","status":"open","priority":4,"issue_type":"feature","owner":"ezo.dev@gmail.com","created_at":"2026-07-03T04:31:41Z","created_by":"Sinity","updated_at":"2026-07-31T22:35:46Z","labels":["area:ingest","area:query","area:substrate","delivery:K-interop-origin-export","delivery:ac-patched","lane:origin-interop-export"],"dependencies":[{"issue_id":"polylogue-fs1.4","depends_on_id":"polylogue-cijx.1","type":"blocks","created_at":"2026-07-29T06:52:02Z","created_by":"Sinity","metadata":"{}"},{"issue_id":"polylogue-fs1.4","depends_on_id":"polylogue-fs1","type":"parent-child","created_at":"2026-07-03T06:31:40Z","created_by":"Sinity","metadata":"{}"},{"issue_id":"polylogue-fs1.4","depends_on_id":"polylogue-fs1.1","type":"blocks","created_at":"2026-07-03T06:31:41Z","created_by":"Sinity","metadata":"{}"},{"issue_id":"polylogue-fs1.4","depends_on_id":"polylogue-fs1.3","type":"blocks","created_at":"2026-07-10T11:03:54Z","created_by":"Sinity","metadata":"{}"}],"dependency_count":3,"dependent_count":2,"comment_count":0} | ||
| {"_type":"issue","id":"polylogue-fs1.2","title":"Importer: NeMo Relay ATOF/ATIF runtime spans","description":"Import Hermes observer-layer trace exports as runtime span evidence: pre/post_api_request -> LLM request spans; pre/post_tool_call -> tool execution spans with duration/status; approval hooks -> high-risk decision points; subagent hooks -> delegation graph; error hooks -> retry/fallback taxonomy. ATIF import + enrichment beats inventing another trajectory format — respect Hermes's actual extension seams and make Polylogue the normalizer.","design":"VERIFY first: current NeMo Relay plugin output shape in the Hermes repo (ATOF JSONL / ATIF JSON exported from observer hooks). Ingest route: new artifact kinds in the taxonomy (archive/artifact_taxonomy/) + a spans parser under sources/parsers/, landing as ObservedEvents/actions attached to the session (join key: Hermes session id from the trace envelope -> sessions.native_id). Map: pre/post_api_request pair -> LLM request span (duration, model, provider, token fields if present); pre/post_tool_call -> tool execution span with duration/status (structural outcome — feeds is_error/exit_code lanes where present); approval hooks -> decision-point events; subagent lifecycle -> topology_edges (subagent type); error hooks -> retry/fallback taxonomy events. Spans without a matching archived session become explicit acquisition debt rows, not silent drops.","acceptance_criteria":"`polylogue-fs1.2` adds or updates an origin contract with detector, parser, raw fixture, normalized fixture, parser fingerprint, and fidelity/completeness notes. Ambiguous inputs are handled deterministically. The regression suite proves idempotent replay and visible degraded/missing-field behavior. Verification artifact: OriginSpec detector/parser/fixture/fidelity suite and content-hash export/import roundtrip.","notes":"[Delivery upgrade 2026-07-07T00:05:00Z] Release=K-interop-origin-export; lane=origin-interop-export; readiness=D-horizon-ready; proof=OriginSpec detector/parser/fixture/fidelity suite and content-hash export/import roundtrip. Original readiness=E-spec-needed.\n2026-07-10 Hermes contract refinement: ingest context_injected with profile/session/turn/snapshot-revision correlation; unpaired spans remain explicit acquisition debt. fs1.7 owns atomic spool/export production; this bead owns normalization and reconciliation.\nImplemented and PR opened (not merged): #2876 (feature/hermes/lifecycle-spool-and-bridge).\n\nScope understood: import Hermes observer-layer (NeMo Relay) trace exports as runtime span evidence, normalized and reconciled per the design's mapping (pre/post_api_request -> LLM request spans, pre/post_tool_call -> tool spans, approvals -> decision points, subagent hooks -> delegation evidence, error hooks -> retry/fallback taxonomy).\n\nHonesty constraint documented explicitly in code + PR: the real ATOF/ATIF wire shape was not independently verifiable from this workspace -- no local checkout of the Hermes observer-plugin source was available. sources/parsers/hermes_spans.py implements a documented, testable, best-effort marker-based schema derived from this bead's own design notes and the shared lifecycle taxonomy (hermes_lifecycle.py, fs1.7). Every fidelity capability the parser declares tops out at \"inferred\", never \"exact\", for this reason -- filed as a concrete follow-up (fs1.2.1, not yet created as a bead by me -- flagging here so the orchestrator can file it) to re-verify against real Hermes source and tighten fidelity if it matches without changing the public contract.\n\nWhat changed: sources/parsers/hermes_spans.py (detector/parser/fidelity), wired into the real dispatch pipeline (sources/dispatch.py: detect_provider, lowering, parse_payload -- same path every other origin uses, not a bespoke test-only entrypoint); new artifact-taxonomy classification (archive/artifact_taxonomy/runtime.py).\n\nAC checklist: origin contract with detector/parser/raw fixture/normalized fixture/parser fingerprint/fidelity notes -- satisfied (marker_payload() is the raw-fixture generator used by every test; normalized output is the ParsedSession/session_events produced; fidelity via import_fidelity_declaration()). Ambiguous inputs handled deterministically -- satisfied: unrecognized hook_type -> generic hermes_observer_span event (never dropped, never misclassified as a known kind); malformed span entries (missing hook_type/span_id, non-dict entries) are skipped and counted, not crashing. Idempotent replay -- satisfied and tested (test_atif_parse_is_idempotent_and_deterministic: same document parsed twice -> byte-identical structural output). Visible degraded/missing-field behavior -- satisfied: unpaired spans (start without finish) are counted and surfaced as an explicit degraded fidelity capability with a caveat, never silently dropped.\n\nDesign gap explicitly NOT closed, documented not silently assumed: physical merge of observer spans into the state-db-ingested conversational session's message tree (the design's \"landing as ObservedEvents/actions attached to the session\"). This parser instead produces its own observer-evidence session (observer:<hermes_session_id>) with a read-side correlation helper (hermes_observer_session_id_for) joining by the shared raw Hermes session id -- a physical content-tree merge across two independently-acquired artifacts is a session-identity/lineage design decision (topology_edges/session_links) I judged out of scope for this pass rather than improvising a schema-adjacent change.\n\nVerification: devtools test tests/unit/sources/parsers/test_hermes_spans.py -- 9/9 passed (subset of PR's 43-test combined run). devtools verify --quick exit 0.\n[gpt-5.6-terra integration refinement, 2026-07-14]\n\nReal producer evidence now exists: the bundled NousResearch Hermes observability/nemo_relay plugin emits ATIF v1.7 session documents and append-only ATOF JSONL through actual session, LLM, tool, approval, and subagent callbacks. ATIF import is live. The remaining producer-to-archive gap is ATOF materialization, not schema speculation.\n\nRefine this bead implementation order: retain byte-identified ATOF raw evidence first; incremental reader checkpoints file identity plus byte offset; tolerate partial final lines and rotation/truncation; validate/order/deduplicate events; materialize normalized lifecycle/action evidence idempotently; retain parent/child subagent links; surface unpaired/unmatched records as debt. Never synthesize ATIF from ATOF or duplicate transcript bodies into events. Update OriginSpec fidelity only where real exported fixtures prove a field mapping.","status":"closed","priority":4,"issue_type":"feature","owner":"ezo.dev@gmail.com","created_at":"2026-07-03T04:31:39Z","created_by":"Sinity","updated_at":"2026-07-31T22:35:43Z","closed_at":"2026-07-20T21:34:47Z","close_reason":"Complete in substance across the merged chain — every item of the 2026-07-14 refined implementation order shipped: byte-identified ATOF raw retention + incremental byte-offset reader with partial-line/rotation tolerance (pre-existing append-plan mechanism, verified fs1.2.1 notes); validate/order/dedup + idempotent lifecycle/action materialization (#3103); shared-file multi-session correctness (#3113/flxh); parent/child subagent links from producer-positive marks, fail-closed (#3231); unpaired/unmatched as explicit debt (#3103). Identity composed with profile+artifact-family qualification (#3224/#3225). OriginSpec detector/parser/fixture/fidelity satisfied against REAL producer fixtures with marker-only payloads as negative tests (#3231, fs1.2.1 closed). Force rationale: remaining blocker edge 2qx.1.1 (shared OriginSpec admission kernel/conformance law) is a lane-gate shared suite per the delivery-ac-template-interpretation adjudication (2026-07-07) — not a per-bead requirement; the Hermes origin will conform when that kernel lands, tracked there.","metadata":{"authored_by":"gpt-5.6-terra","authored_on":"2026-07-14"},"labels":["area:ingest","area:substrate","delivery:K-interop-origin-export","delivery:ac-patched","lane:origin-interop-export"],"dependencies":[{"issue_id":"polylogue-fs1.2","depends_on_id":"polylogue-2qx.1.1","type":"blocks","created_at":"2026-07-15T20:55:32Z","created_by":"Sinity","metadata":"{}"},{"issue_id":"polylogue-fs1.2","depends_on_id":"polylogue-fs1","type":"parent-child","created_at":"2026-07-03T06:31:39Z","created_by":"Sinity","metadata":"{}"},{"issue_id":"polylogue-fs1.2","depends_on_id":"polylogue-fs1.2.1","type":"blocks","created_at":"2026-07-14T11:39:19Z","created_by":"Sinity","metadata":"{}"}],"dependency_count":2,"dependent_count":2,"comment_count":0} | ||
| {"_type":"issue","id":"polylogue-harness-clone-contracts","title":"test(infra): restore archive-clone and embedding-stat contracts","description":"A current-master comparison for polylogue-mn0si exposed two independent shared-harness regressions. Cloned empty archives retained a fresh-bootstrap receipt bound to the template root, and the embedding-stat contract mock ignored bound sqlite_master parameters. Repair both without weakening durable identity checks or changing production embedding semantics.","acceptance_criteria":"1. Cloning the shared empty archive rebinds the fresh durable-bootstrap receipt to the destination identity, opens through the real ArchiveStore route, and leaves the source receipt unchanged. 2. The embedding-stat contract fixture resolves sqlite_master probes from bound parameters and preserves the intended legacy fallback count behavior. 3. The seven focused regressions pass, formatting and lint pass, and a complete current-master full-suite ledger records unrelated residual failures without claiming them fixed. 4. No production durable-train safety check or embedding provider behavior is weakened.","status":"open","priority":1,"issue_type":"bug","owner":"ezo.dev@gmail.com","created_at":"2026-08-08T06:54:56Z","created_by":"Sinity","updated_at":"2026-08-08T06:54:56Z","dependencies":[{"issue_id":"polylogue-harness-clone-contracts","depends_on_id":"polylogue-mn0si","type":"discovered-from","created_at":"2026-08-08T08:54:56Z","created_by":"Sinity","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0} |
There was a problem hiding this comment.
Close the satisfied harness bead
This commit implements every listed acceptance criterion and its disposition matrix declares the bead satisfied, but the newly persisted record remains open. Once landed, bd ready can continue advertising this priority-1 bug as unfinished and cause duplicate work; record the completion with bd close <id> --reason ... so durable task state matches the delivered change.
AGENTS.md reference: AGENTS.md:L288-L298
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in 3ceb86c. The branch now records the satisfied Bead as closed with the exact focused and full-ledger evidence, and the PR scope carrier is rebound to the new head.
Record the full acceptance disposition for the archive-clone and embedding-stat harness repair after focused and quick verification.\n\nRef polylogue-harness-clone-contracts.\n\nCo-Authored-By: Codex <noreply@openai.com>
The previous Circle run read the pre-review PR scope carrier before the body update reached GitHub. Re-run the scope-bound checks against the already validated exact-head carrier.\n\nCo-Authored-By: Codex <noreply@openai.com>
## Summary Seeded workload archive clones now replace the copied fresh durable-bootstrap marker with evidence bound to the destination clone before use. Reflink and ordinary copy clones both open through the real `ArchiveStore` path without weakening durable-continuity checks. ## Problem The immutable seeded artifact's marker binds the source and user database identities. `clone_seeded_archive` copied that marker unchanged, so the first real writer open rejected the clone with a durable-identity mismatch. PR #3883 covered empty archive-template clones, but not seeded workload artifacts used by candidate and canary tests. ## Solution After making the clone writable, `tests/infra/workload_artifacts.py` removes only the copied marker and invokes the production bootstrap recorder against the destination. Tests exercise real `ArchiveStore` opens, prove the immutable source marker remains unchanged, cover reflink and forced-copy paths, and prove that restoring a foreign marker still fails closed. Ref `polylogue-seeded-clone-bootstrap-rebind`. ## Verification - `.venv/bin/mypy --strict tests/infra/workload_artifacts.py tests/unit/infra/test_workload_artifacts.py`: `Success: no issues found in 2 source files` - `.venv/bin/python -m devtools test tests/unit/infra/test_workload_artifacts.py tests/unit/test_pytest_temp_policy.py tests/unit/storage/test_durable_change_train.py::test_startup_proves_durable_continuity_before_initialization_or_release`: `26 passed` - `.venv/bin/python -m devtools verify --quick`: all 24 steps green at exact head, receipt `20260808T083519Z-quick-3611577-c2b1e641` <!-- polylogue-pr-scope:v1 { "assigned_beads": [ "polylogue-seeded-clone-bootstrap-rebind" ], "beads_digest": "9299b4536387da688b131a95408657977a2507abf3dc700797222afda1bf55ac", "dispositions": [ { "bead_id": "polylogue-seeded-clone-bootstrap-rebind", "disposition": "satisfied", "evidence": [ { "kind": "commit", "ref": "c170fc96a" }, { "kind": "test", "ref": "26 focused workload-clone, temp-policy, and durable-continuity tests passed" }, { "kind": "receipt", "ref": "verify:20260808T083519Z-quick-3611577-c2b1e641" } ], "successors": [] } ], "head_sha": "c170fc96a3fbfba91a45a7008a4c8856abe8b7aa", "scope_digest": "6107ea5ee84dc90ad6ba1f4a8dd217992bffa78a55e8f685b653c1daec7c8961", "version": 1 } --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved seeded archive cloning to correctly initialize cloned archives without altering the original source. * Added safeguards to reject invalid or tampered archive identity markers. * Improved reliability when the preferred cloning method is unavailable by using a validated fallback. * **Tests** * Expanded coverage for clone isolation, fallback behavior, archive usability, and durable bootstrap validation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Codex <noreply@openai.com>
Summary
Restore two shared test-harness contracts exposed while validating
polylogue-mn0si: archive-template clones now receive destination-bound durable bootstrap evidence, and the embedding-stat fixture now respects bound SQLite table probes.Problem
The session-scoped empty archive template carried a durable bootstrap marker bound to the template root and durable file identities. Copying that marker into a private test archive caused legitimate
ArchiveStoreopens to fail closed. Separately, the embedding-stat contract mock discardedsqlite_masterquery parameters, so every introspection branch saw the wrong table and returned the wrong fallback count.Solution
tests/conftest.pyreplaces only the copied fresh-bootstrap marker through the production receipt writer after cloning. The regression opens the destination throughArchiveStoreand proves the source marker remains unchanged.tests/unit/storage/test_vec.pynow derives the inspected table from bound query parameters, preserving the intended legacy fallback behavior. No production durable-train guard or embedding-provider behavior changes.Verification
ruff format --checkandruff check: passed.devtools verify --allstatic, typing, rendering, layering, schema, and policy steps: passed.20260808T062115Z-full-1249172-f00c535f: 20,191 selected, 19,758 passed, 414 failed, 16 errored, 3 skipped in 1,227.13 seconds. The machine-readable residual ledger is retained separately; this PR does not claim those unrelated failures are repaired.Bead disposition matrix
polylogue-harness-clone-contracts8cd66b51b,896b79fec,3ceb86cdf, 7 focused passes, full-suite receiptRef
polylogue-harness-clone-contracts.