Skip to content

docs(rfc): mcp session trace as the lifecycle event log's first emitter - #7629

Merged
iamwhatever merged 1 commit into
mainfrom
docs/rfc-mcp-lifecycle-event-log
Sep 2, 2026
Merged

docs(rfc): mcp session trace as the lifecycle event log's first emitter#7629
iamwhatever merged 1 commit into
mainfrom
docs/rfc-mcp-lifecycle-event-log

Conversation

@buluoray

@buluoray buluoray commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Problem

The lifecycle event log (src/kiro_crew/events/, #3808 / #7386) is a validated schema with no
live writer. Its own contract defers the ordering model and the writer to "the first emitter",
and the backfill validator defers the write path to "the first consumer that folds the log".
Whoever emits first therefore sets package-level precedent for every later domain — ordering
scope, writer shape, and failure posture — and today those decisions would be made ad hoc inside
whatever feature PR happens to arrive first.

Separately, #7366's MCP session report leaves three structural residuals: history dies with the
session (a reset's previous generation is unrecoverable, and ACP cannot be re-asked), report
invalidation rests on a projector identity check plus seven courtesy clear call sites, and
nothing about MCP registration is traceable after the fact.

Why it matters

The task-manager and context-panel surfaces named in #3808 will inherit whatever the first
emitter establishes. Deliberate precedents reviewed once beat accidental ones re-litigated per
domain. And the MCP trace itself answers a real operator question — which server failed, when,
across which session generations — that no store can answer today.

Fix

A design-of-record RFC in docs/request-for-change/, no implementation code. It settles three
package-level precedents — per-key monotonic seq assigned by a single gateway-owned writer
(global order deliberately unpromised); one append path to <data_home>/events/lifecycle.jsonl
rotated by the existing jsonl_util helper; fail-open posture with the SEL contrast stated
once (an emitter needing fail-closed semantics belongs in SEL) — and exercises them through one
concrete emitter/consumer pair: five mcp/ kinds emitted from #7366's existing capture points
(downstream of its ownership predicate and redaction, so attribution guarantees are inherited),
folded into a per-slot MCP trace with labeled prior-generation history. Three additive phases;
rollback at any phase is deletion.

The docs/request-for-change/README.md index gains the corresponding row, audited against
1ee69f225 per that file's convention.

Tests

None — documentation only. bash scripts/docs-lint.sh passes (252 files scanned, index
consistency enforced); the brand gate passes on the added lines.

Why no screenshot: documentation-only change; no user-visible surface is touched.

No linked issue: design proposal originating from review of #7366's residual gaps; the RFC
itself is the tracking artifact until accepted.

@buluoray
buluoray requested a review from a team as a code owner September 1, 2026 14:09
@buluoray
buluoray requested a review from cixuuz September 1, 2026 14:09
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed 95d461ce58794ac0b80a64373663b6be9b2c39af — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 95d461c

Verdict parsed from the review's SHA-scoped output markers for commit 95d461ce58794ac0b80a64373663b6be9b2c39af.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 95d461ce58794ac0b80a64373663b6be9b2c39af: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 95d461ce58794ac0b80a64373663b6be9b2c39af — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Docs-only PR verified: the events package (src/kiro_crew/events/), jsonl_util.rotate_jsonl_at, and the RFC index convention all exist on main; #7366's symbols do not, which the index row honestly discloses. The design decisions (per-key seq, single gateway writer, fail-open with the SEL contrast, additive phases, deletion rollback) are each given a named cause and a considered alternative.

Design-Verdict: PASS

Deliberate, disclosed, and reversible: settles three package precedents through one grounded emitter, with rollback-by-deletion and the #7366 dependency stated in the index.

Suggestions

  • Phase 3's gate ("session-ended events observed covering every teardown path") conflicts with open question 2's proposed answer (shutdown/crash emits nothing); restate it as covering the four in-process causes only.

[DESIGN-REVIEWED] 95d461c

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 95d461ce58794ac0b80a64373663b6be9b2c39af and found no blocking issues.

This comment is updated in place on each push.

Review details

FINDING -- docs/request-for-change/rfc-mcp-lifecycle-event-log.md:103 -- rotate_jsonl_at creates one sibling .1, not lifecycle.d/ with four segments -> Fix: specify its actual one-generation layout or separate four-segment rotation.
FINDING -- docs/request-for-change/rfc-mcp-lifecycle-event-log.md:108 -- restarts its counter contradicts the promised per-key monotonic sequence when a key spans rotation -> Fix: seed from retained segments or scope seq to one segment. (origin: validation)
[GPT-REVIEWED] 95d461c

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 95d461ce58794ac0b80a64373663b6be9b2c39af: <one-sentence reason>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Sep 1, 2026
@iamwhatever
iamwhatever merged commit 33c092d into main Sep 2, 2026
108 of 109 checks passed
@iamwhatever
iamwhatever deleted the docs/rfc-mcp-lifecycle-event-log branch September 2, 2026 00:37
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Sep 2, 2026
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.

2 participants