Generate the minor ledger's metadata from the schema #135
No reviewers
Labels
No labels
Area/ci
Area/cli
Area/client
Area/client-core
Area/daemon
Area/deps
Area/docs
Area/grid
Area/manual
Area/nix
Area/protocol
Area/pty
Area/render
Area/shaping
Area/skills
Area/transport
Area/vt
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Security
Kind/Testing
perf-regression-accepted
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Blocked
Status
Need More Info
Status
Upstream
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
felis-terminal/felis!135
Loading…
Reference in a new issue
No description provided.
Delete branch "protocol/schema-first-ledger"
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?
Closes #129.
Why
Each wire addition was stated by hand in several Rust places: an
ArmMetarow that a test compared with the(felis.v1.arm)option by parsing the schema text, an exhaustivesince_minor()arm per closed-enum value, anADDED_FIELDSorGatedFieldentry per field,WireCodec::ARM_FIELDS, andMINOR_LEDGER. A non-Rust peer could read arm minors from the descriptor but not those of fields or enum values.What
felis.protonow carries every addition's minor:(felis.v1.field_since) = { minor, skippable }(ArmRouting.sinceis gone, so an arm is dated like any field). A field is gated unless it is markedskippable, so a forgotten flag refuses the send rather than letting an older peer silently skip it;(felis.v1.value_since).tools/proto/schema_meta.pyreads thebuf builddescriptor and generatessrc/schema_meta.rs:since_minorfor each frame-reachable enum;oneofmember, arm or payload, can be skippable).just protoruns the script afterbuf generate, and aschema-metapre-commit hook fails on a stale copy.MINOR_LEDGER(the doc test now counts rows itself).MinorGatedimpls and theGatedFieldpresence tests) stays hand-written.Family::Variant/Enum::VALUE/Message.fieldidentifiers exactly and fails on one the schema does not date at that minor. A test also requires every enum carrying an added value to be one the gate reads. Forgetting both the annotation and the ledger row goes uncaught, as it does today.docs/reference/ipc.md(the arm table, the minor ledger),testing.md,workspace.md, the explanation pages, theextend-ipcskill, andtools/README.md.Verification
just checkpasses.field_sinceis dropped;oneofmember.5008b73cced5a33321add5a33321adcb7a6589f0