transport: gate every send on the connection's effective minor #177
No reviewers
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis!177
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/minor-send-authorization-50"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #50.
Send authorization for protocol minors now lives in one place. The minor ledger became executable metadata in
felis-protocol(minor.rs): every gated addition declares the minor it requires, and the writer consults thatmetadata instead of each call site remembering the rule.
FrameWritercarries the connection's effective minorand refuses — or degrades — any frame that would emit an addition the peer never negotiated, so the daemon's
outbound frames, the client's outgoing queue, and the CLI bridge all pass through the same gate.
The daemon degrades a reply to the peer's minor before sending it, the client omits an attach field an older
daemon would ignore, and the gate reaches the values nested inside an arm rather than only the top-level arm.
A ledger-coverage test holds the prose ledger and the executable metadata to each other in both directions.
felis-client-core'scheck_scope_minor/check_arm_minorand the client-sidedaemon_statusrefusal stay:they are the explicit local refusals the issue asks for and the CLI's exit-code mapping keys on
ConnectError::MinorTooOld. The writer is the backstop behind them, not a replacement.Doc cascade:
docs/reference/ipc.md(the ledger and the send-authorization rule),docs/explanation/architecture/ipc.md(why authorization is centralized on the writer),docs/reference/row-codec.md, anddocs/reference/testing.md(the ledger-coverage test).Verified: just check green (fmt, clippy, nextest, deny, proto-compat); reviewed by pi luna (round 1) + pi luna + pi sol; docs proofread by Gemini gemini-3.8-flash-high
Follow-ups
Deferred
FrameWriter::write_frameis unreachable from a downstream crate —pub(crate)already makes rustc the check for every consumer; a trybuild harness would add a dev-dependencyand a test kind the workspace does not have.
felis-client-core'scheck_scope_minor/check_arm_minorand the client-sidedaemon_statusrefusal werekept rather than deleted in favor of the writer gate — they are the explicit local refusals criterion 3 asks
for, and the CLI's exit-code mapping keys on
ConnectError::MinorTooOld; the writer is now the backstopbehind them, not a replacement.
reduction from the issue's own triage plan, filed as #164.
duplicate of the matrix finding, same pre-agreed deferral to #164.
asked for — outside this branch's control since dependency issue #30 was closed without landing.
across these fallback paths are the same territory #164 already tracks; bespoke boundary tests here would be
hardening beyond what this PR's acceptance criteria require.
2ec23c2a87939db56bdf