fix(capsule): make component→root capability merge exhaustive (#1232) - #1381
Merged
joshuajbouw merged 1 commit intoAug 13, 2026
Merged
Conversation
jvsteiner
marked this pull request as ready for review
July 26, 2026 12:27
Contributor
Author
|
@joshuajbouw ready for review — exhaustive |
Member
|
Review outcome: technically worth advancing. The exhaustive capability merge and regression coverage look correct, and the substantive CI jobs are green. Please fix the required PR-template sections and add the changelog entry so the repository checks can pass. |
…ime#1232) Merge every component-level capability into the root manifest through an exhaustive, compile-checked union. Add discovery-seam and full flag/list regression coverage so future capability fields cannot be silently dropped. Closes astrid-runtime#1232. Co-authored-by: Jamie Steiner <jvsteiner@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Joshua J. Bouw <jjb@unicity-labs.com>
joshuajbouw
force-pushed
the
fix/1232-exhaustive-capability-merge
branch
from
August 13, 2026 14:46
acc290a to
f3c5278
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked Issue
Closes #1232.
Summary
discovery.rsfolded each[[component]].capabilitiesinto the root manifest field-by-field by hand-enumeration, so fields not explicitly listed were silently dropped. The security gate reads only the root, meaning a component-only declaration could appear inastrid capsule showwhile granting nothing.Changes
CapabilitiesDef::merge_from: allowlists concatenate and flags are OR-ed..., so adding a capability field fails compilation until its merge behavior is handled.Verification
cargo fmt --all -- --checkcargo test -p astrid-capsule-types merge_from_ -- --nocapturecargo test -p astrid-capsule component_level_capabilities_merge_into_root -- --nocapturecargo clippy -p astrid-capsule-types -p astrid-capsule --all-features -- -D warningsgit diff --cached --checkAI / Tool Assistance
Assisted-by: Anthropic Claude: Opus 4.8
Assisted-by: OpenAI Codex: GPT-5
Claude assisted Jamie with the original implementation. Codex independently reviewed the architecture and capability semantics, strengthened the regression coverage, reconciled the patch onto current
main, and validated the affected crates. I reviewed the final combined patch and created the GPG-signed, DCO-compliant commit. Jamie and Claude remain credited as co-authors.Checklist
Signed-off-bytrailer.