Repository navigation
Conversation
|
Intent: Make session-ledger identity work on fresh installations and keep shared-runtime children bound to their own sessions. |
Design Review (Fable 5) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS A deliberate opt-in pin is reversed to broker-by-default for core, and the PR itself says that topology decision is not yet approved. Watch
Suggestions
[DESIGN-REVIEWED] 5fee6cd |
First Principles Review (Fable 5) — 🟡 CONCERNSPremise-level review of All evidence is gathered and verified. Producing the review. First-Principles-Verdict: CONCERNS The headline item is a changed default the author themself marks "not yet approved" — it rewrites a pinned opt-in decision and needs the maintainer call it requests. Not justified as shipped
What this change shipsInventory (10 items, capped — baseline regen and test patch-target fixes omitted) — 8 justifiedIntent: make core session-ledger tools work on a fresh install (and give shared-runtime children their own identity) without manual routing — a FIX whose central mechanism is a changed default.
Watch
[FIRST-PRINCIPLES-REVIEWED] 5fee6cd |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 4.8 Review — ✅ no blocking findingsReviewed Review detailsThe candidate discovery pass returned no candidates. My independent review of the functional hunks confirms:
Each of these was a path where a defect could hide; none survives to the (a)/(b)/(c) bar at 80+. No findings. [OPUS-REVIEWED] 5fee6cd Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
86df10d to
af25ad3
Compare
|
self-added: yes
|
|
self-added: yes
|
|
self-added: yes
|
|
self-added: yes
|
|
Acknowledged the Design Review PASS on af25ad3. The core-only default, explicit upgrade/sharing behavior, and fallback identity boundary remain the intended scope. No further design changes are requested by this verdict. |
|
Confirmed the real-install premise requested by First Principles, and repeated the clean-install diagnostic on The original process inspection found The new verification ran on September 11, 2026, 18:47:04–18:47:50 UTC:
This adds a fresh test of the published commit to the original process reproduction and the earlier clean-home verification. The read exercises the strict identity gate shared with ledger writes; it does not claim to verify write persistence. |
af25ad3 to
e7e25f4
Compare
|
Rebased the existing fix onto current Validation after the rebase:
CI and automated reviews are rerunning for this commit. The earlier green CI and local wheel remain evidence for the previous revision only. |
e7e25f4 to
07a6029
Compare
Route core through the broker on unconfigured installs and preserve the owning data home when harnesses filter MCP environment. Keep explicit routing choices and the existing backend-sharing setting. Bind shared-runtime subagents and task sessions to their own session so parent claims cannot select the wrong ledger. Keep that authority inside broker stubs and verified managed fallback backends without dropping backend credentials. Load stubs from the running gateway package tree, excluding workspace and Python startup overrides while preserving source-only installs. Refresh cached launch commands when their code location or site policy changes. Report unidentified broker connections without repeating routing advice. Explain how upgraded installs with a saved empty roster enable core routing, both in doctor and the shipped user guides. Resolve late caller identity before forwarding MCP requests, so the first ledger call cannot overtake a published mapping. Replace periodic polling with a bounded request-time check and retain pending work across reconnects. Keep strict refusal when identity is absent and preserve gateway rekeys. Align the inherited cron removal test with the existing loader contract: malformed session keys become unset while their job survives.
7266ece to
5fee6cd
Compare
|
CI correction and verification — The failed Windows assertion contradicted the existing cron loader contract. The correction keeps the malformed fixture and proves unrelated removal succeeds while the normalized job survives. No cron product behavior changed. The original ledger patch is unchanged, and the branch is rebased onto {
"head": "5fee6cd8046a26103d54e6ae8a07feb434c52f33",
"base": "8b58f72a8677c649cefe6cb5582d7c70f56ea5ea",
"authored_delta_since_7266ece0": "Test-only correction: retain malformed job and expect its normalized empty session_key. Original 44-file patch unchanged.",
"cron_failure_comparison": {
"node": "test/test_remove_slot_for_history_key.py::TestAFailedRemovalDoesNotLeakIntoTheNextSave::test_malformed_persisted_owner_does_not_poison_unrelated_removal",
"exact_base": "ea9ada27ff97a2c81426496dbd2420bd919dfec9",
"exact_candidate": "7266ece0fc95c9f40c88f0cf1b54c53fd1956cc4",
"original_result": "Same assertion failure on both; imported source and conftests verified; bytes stable.",
"cause": "Existing _guard_str normalizes a malformed session_key; later upstream test expected the corrupt list to survive.",
"corrected_whole_cron_files": "179 passed"
},
"current_head_tests": {
"backend": "2114 passed, 1 failed across 20 whole files; exit 1.",
"failed_node": "test/test_dashboard_chat.py::TestRuntimeWiring::test_run_chat_passes_memory_store_to_build_message[none]",
"failure": "NotImplementedError: atomic no-replace rename is unavailable",
"exact_base_comparison": "Same node, exception and source frames on untouched 8b58f72a8677; host glibc lacks renameat2 symbol. Both exit 1.",
"frontend": "58 passed in both complete SlotTagPopover test files.",
"static": "Formatting, import order, subprocess encoding, flake8, mypy, harness parity, docs lint: passed."
},
"build": {
"fresh_frontend": "passed",
"wheel": "passed",
"sha256": "92f28e28a35a43b383ba6ff1b90e36f1394ae15acfc79b30237266ca43d020c0",
"python_files_identical": 1475,
"frontend_assets_identical": 2396,
"installed": false
},
"local_reviews": "Both focused contracts: no findings on this SHA, using inherited model. These are not CI GPT/Claude results.",
"live_proof": "Successful KAS mounted session_ledger_read remains attributed to 7266ece0; comment 5643919604. Every product file authored by this PR is byte-identical. No new live run claimed.",
"prior_ci": "Windows shard 3 failed the inherited cron expectation. Remaining run canceled before editing. Linux shard logs contained no additional failure/error before cancellation; canceled shards are not passes.",
"fresh_ci": "Required on current published head; not yet complete.",
"retrospective": "13 grouped mechanisms kept; no required removal. Schema bump has an optional smaller alternative. Retaining this existing correct cache marker for the CI-only correction; no new runtime mechanism.",
"maintainer_decisions": "Default route topology, saved-empty-roster handling and future save provenance remain unapproved."
}The required retrospective found no mandatory subtraction. Its optional fingerprint-schema simplification is deferred: the retained schema marker is correct, while removing it would not address this CI failure. The four existing maintainer choices remain open; no approval is inferred. |
|
self-added: yes
|
|
self-added: yes
|
|
self-added: yes
|
|
self-added: yes
|
|
self-added: yes
|
|
self-added: yes
|
|
self-added: yes
|
|
Not approving for now: the branch has merge conflicts with main; please rebase and we'll take another look. |
|
A maintainer attempted a conflict-only rebase of this PR onto main What blocks a mechanical rebase:
Once rebased onto current main with the above reconciled, readiness should re-evaluate on the new head. |
|
@Zedmor Maintainer sweep (2026-09-24, on behalf of @bolichen97): this PR carries State: |
|
Thanks for this, @Zedmor. While reviewing for a rebase onto current Two intents from this PR that
Both are arguably a product/direction call rather than a mechanical change. Would the maintainers prefer these landed as a small follow-up PR on top of |
|
Readiness sweep 2026-09-29 — evidence for @iamwhatever's close-or-re-land question (not closing from the sweep, since that question is live). The conflict is semantic, not textual: this PR's 45-file diff implements stub-side session identity (recaller frame, late off-loop PID lookup under the stub's data home, |
|
Thank you so much for this, @Zedmor — the session-identity problem you tackled here was a real one, and your diagnosis and the stub-side approach were genuinely valuable in surfacing it. Since this PR was opened,
on the roster framework from #8333. Big thanks to @bolichen97 for the careful analysis tracing exactly how those landed and where they overlap with this diff. What remains of your original goal — core stubbed by default — comes down to a small (<10-line) roster default in |
Problem / Motivation
On a new installation, a member's session-ledger tool can be present but refuse calls because core has no verified caller. Core bypasses the identity broker by default. Enabling that route manually can still leave a stub looking in the wrong data home, or allow its first request to outrun identity publication. Children sharing a runtime also need their own identity: the parent PID cannot distinguish their calls.
Why it matters
Members need durable session checkpoints without manual routing. Delegated children must use their own checkpoints without gaining access to their parent's ledger.
What changed (motivation → approach → change)
Core uses a broker stub when no current or legacy roster is saved. Explicit rosters, including
[], are preserved; backend sharing stays off by default. Stubs receive their owning data home across filtered harness environments.An unidentified stub resolves late caller identity before forwarding an MCP request, then sends the existing
recallerframe first on the same connection. Lookup runs off the event loop with a one-second aggregate deadline. Pending work survives reconnects without duplicate jobs; a completed stale miss gets one fresh lookup within that deadline. Missing identity still produces the strict backend refusal.Shared-runtime children and TaskRunner steps receive their own session keys. Reusable overlays carry no session keys or backend credentials. Gateway claims preserve explicit child bindings, warm-runtime rekeying and PID-based aborts. Explicitly bound stubs require
session_bound_ack; an incompatible initial connection uses verified direct fallback, while an incompatible reconnect stops before replay. An unverified fallback receives no session-key or host-PID authority.Generated stub commands load the gateway's package tree using
-B -E -P, a standard-library bootstrap and a separate trusted-root argument. Workspace packages and Python startup overrides cannot replace the stub. Source-only installs and the gateway's no-user-site policy remain supported. Cached launches regenerate when their schema, package location, owning home or site policy changes.stub_servers: []Doctor and shipped guides explain the saved-empty-roster upgrade. Diagnostics distinguish missing routing from missing identity. Private V2 and strict ledger authorization keep their existing boundaries.
Maintainer decision requested (not yet approved): whether to accept one broker per data home and one stub per core connection; newly routed core participates if sharing was already enabled. Historical serialized
[]cannot be distinguished from an intentional opt-out and requires manual activation. Configuration saves persist the resolved default roster.This fixes
session_ledger_*identity throughkirocrew-core, the only new default route.kirocrew-dashboardkeeps its existing per-agent opt-in and member-DM session mount. On supported backends with Crew-owned permissions, that member mount carries its session key, bound gateway port and owning home. General dashboard routing remains outside this change. Main's conductor work-item ledger (kirocrew-work, #10265) is a separate existing feature whose default routing is also outside this change. Workflow-ledger support and completion callbacks remain separate work.Tests
On
5fee6cd8046a, 2,114 tests passed and one failed across 20 complete backend files covering the incoming session-tag changes, cron persistence, runtime identity and both ledgers. The failingTestRuntimeWiring::test_run_chat_passes_memory_store_to_build_message[none]reproduced on untouched base8b58f72a8677: this host's glibc lacks the atomic no-replace rename symbol. Both runs exited 1. This is a baseline comparison, not a fully passing local suite.The two complete cron files passed 179 tests in a separate run. The inherited removal test retains the malformed on-disk input and verifies that unrelated removal succeeds, the parent stays removed and the surviving job has the loader's documented empty session key. Its former list-preservation expectation failed on both
7266ece0fc95and exact baseea9ada27ff97. Product cron behavior is unchanged.Both session-tag UI test files passed 58 tests. Formatting, import order, subprocess encoding, flake8, mypy, harness parity and docs lint passed. Both focused local review contracts reported no findings on
5fee6cd8046a; they used the inherited agent model, not the CI GPT or Claude models.The original 44-file ledger patch is byte-identical to the patch on
7266ece0fc95; the cron test is the only added authored file. Its regression tests cover real late PID publication, first-request ordering, missing identity, timeout/reconnect behavior, stale lookup misses, child bindings, hostile workspaces and source-only installs. Historical full-suite evidence remains scoped toe1fbc357ea1f: 99,171 passed, with 548 failed/error identities reproduced on exact based63917efb29c; both runs exited 1. Final-head GitHub CI remains required.A fresh production frontend build and wheel build passed on
5fee6cd8046a. The wheel's 1,475 Python files and 2,396 frontend assets were byte-verified against the frozen source and new bundle. Wheel SHA-256:92f28e28a35a43b383ba6ff1b90e36f1394ae15acfc79b30237266ca43d020c0. The wheel was not installed over a running user backend.Manual verification
Passed on
7266ece0fc95: a fresh Crew data home with a Global V1 KAS conductor, no saved stub roster and no manual claim completed its first mountedsession_ledger_read. The real KAS-owned stub exposed the tool in its catalog. Normal identity publication was followed by an accepted caller-rekey, then allowed ledger authorization and the completed call returning the empty ledger. The verification comment in this PR (ID 5643919604) records the response, ordered audit and source hashes.This was instrumented transport verification using the normal installed KAS OS home. A stdio interposer kept the generated core command/argv and environment, supplied no caller metadata, and injected exactly one read. No model prompt was forwarded; labeled local instrumentation completed the outer chat. Source bytes stayed unchanged and all owned processes/listeners were cleaned up.
The gateway-set environment marker was absent in the MCP child, while the explicitly declared Crew home survived. The earlier failed harness attempts remain recorded, including isolated-home startup failures and completion-control mistakes. They are not counted as passes.
Every product file changed by this PR is byte-identical to the corresponding file in that live-tested revision. The result remains attributed to
7266ece0fc95; it is not a new live run on the rebased commit.An ordinary LLM conversation was not tested by this diagnostic. Earlier model-driven probes also exposed initial catalog-readiness and remembered-instruction effects; those are distinct from the now-verified mounted identity path. Existing gateway processes must restart to load this change; a terminal reconnect refusal requires a new session.
Related Issues
Related implementation: #5198 (session ledger), #5720 (identity diagnostic), #8393 (shared strict-identity gate).
no linked issue: this fixes a reproduced installation failure.
Pattern harvest
Rule candidate: review-prompt
Pattern: An identity-bearing transport must load trusted code, carry its owning home, order caller repair before dependent requests, and strip authority before handing control to an unverified backend.
Checklist