Skip to content

epiphany(board): E-CONTRACT-NO-SERIALIZE — contracts compile types, membranes serialize#415

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/epiphany-contract-no-serialize
May 27, 2026
Merged

epiphany(board): E-CONTRACT-NO-SERIALIZE — contracts compile types, membranes serialize#415
AdaWorldAPI merged 1 commit into
mainfrom
claude/epiphany-contract-no-serialize

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented May 27, 2026

Copy link
Copy Markdown
Owner

Summary

Prepends an APPEND-ONLY board entry E-CONTRACT-NO-SERIALIZE recording the architectural vow surfaced via the medcare-rs consumer session:

A contract / BBB-tier crate (lance-graph-contract, lance-graph-ontology, lance-graph-callcenter) is a compile-time handshake (shared types + traits), not an outer serialization boundary. JSON emission belongs at the membrane, never on the contract surface.

Names the concrete smell it targets: JsonlAuditSink + UnifiedBridge::with_jsonl_audit living in lance-graph-callcenter (a contract-tier crate) emitting JSONL. The AuditSink trait + UnifiedAuditEvent type stay; the proposed direction is to relocate the concrete JSON sink into a membrane/sink crate. Build-time serde codegen (build.rs parsing manifest.yaml → generated types, #412) is explicitly not a violation — that IS "compile types."

Board-hygiene: prepended a dated entry, no edits to prior entries. No code change — this is a recorded finding/vow for the next session that touches the audit-sink surface. Cross-references medcare-rs CLAUDE.md commitment #7.

Test plan

  • Docs/board-only; no build impact.

https://claude.ai/code/session_018FqA8TfgRBHy8zF92kx4TW


Generated by Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated internal architectural documentation to clarify design principles for contract crates and serialization boundaries.

Review Change Stack

…embranes serialize

Records the architectural vow (user-stated via the medcare-rs consumer
session): a contract / BBB-tier crate is a compile-time handshake (shared
types + traits), not an outer serialization boundary. JSON emission
belongs at the membrane, never on the contract surface.

Names the concrete smell: `JsonlAuditSink` + `UnifiedBridge::with_jsonl_audit`
in lance-graph-callcenter (a contract-tier crate) emitting JSONL. The
`AuditSink` trait + `UnifiedAuditEvent` type are contract-appropriate; the
concrete JSON sink should relocate to a membrane/sink crate. Build-time
serde codegen (manifest.yaml -> generated types in build.rs) is fine.

APPEND-ONLY board hygiene: prepended dated entry, no edits to prior entries.

https://claude.ai/code/session_018FqA8TfgRBHy8zF92kx4TW
@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d118054f-8fc0-4211-98bf-06ada8d7cab4

📥 Commits

Reviewing files that changed from the base of the PR and between c6aa31d and 4a34eff.

📒 Files selected for processing (1)
  • .claude/board/EPIPHANIES.md

📝 Walkthrough

Walkthrough

A new architectural epiphany entry was appended to the decision board documenting the principle that contract crates define compile-time type/trait handshakes, not serialization boundaries. JSON emission belongs at the membrane layer. The entry identifies a specific code smell in JsonlAuditSink placement and notes the desired refactoring direction.

Changes

Architectural Epiphany Documentation

Layer / File(s) Summary
2026-05-27 Epiphany: Contract Crates and Serialization Boundaries
.claude/board/EPIPHANIES.md
Appended epiphany entry recording the architectural vow that contract crates are compile-time type/trait surfaces, not serialization boundaries. Identifies JsonlAuditSink in lance-graph-callcenter as a smell and clarifies that build-time serde/codegen does not violate the principle.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A contract's a handshake, not bytes that persist,
Types at compile-time, JSON shouldn't twist,
Push sinks to the membrane where serialization thrives,
Contract and membrane keep architecture alive!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly summarizes the main architectural vow being documented: that contracts should be compile-time type/trait handshakes, not serialization boundaries, with JSON emission belonging at the membrane layer.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/epiphany-contract-no-serialize

Comment @coderabbitai help to get the list of available commands and usage tips.

@AdaWorldAPI AdaWorldAPI merged commit c8acf55 into main May 27, 2026
1 check passed
AdaWorldAPI added a commit that referenced this pull request May 27, 2026
…serialize-refine

epiphany(board): E-CONTRACT-NO-SERIALIZE-2 — correct #415, the audit event stays inside
AdaWorldAPI added a commit that referenced this pull request May 28, 2026
…serialize

epiphany(board): E-CONTRACT-NO-SERIALIZE — contracts compile types, membranes serialize
AdaWorldAPI pushed a commit that referenced this pull request May 28, 2026
…event stays inside

#415 landed E-CONTRACT-NO-SERIALIZE with "serialize at the membrane" —
the user sharpened it ("why should the audit event go outside?"): audit
is not membrane traffic at all. It is a witness (merkle -> SPO + Lance
tombstone), examined in place by the query engine; the merkle chain IS
the tamper-evidence. No JSON by default; the sink is inner, not membrane;
off-box copies are an infra concern, not the sink's standing behavior.

Board is append-only: prepends a correction entry, leaves the prior entry
intact. §1 (contracts compile types, never serialize) stands.

https://claude.ai/code/session_018FqA8TfgRBHy8zF92kx4TW
AdaWorldAPI added a commit that referenced this pull request May 28, 2026
…serialize-refine

epiphany(board): E-CONTRACT-NO-SERIALIZE-2 — correct #415, the audit event stays inside
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