Skip to content

feat(routines): add capability-rooted declaration source reader - #97

Merged
jscott3201 merged 1 commit into
mainfrom
feat/rust-declaration-source-reader
Aug 24, 2026
Merged

feat(routines): add capability-rooted declaration source reader#97
jscott3201 merged 1 commit into
mainfrom
feat/rust-declaration-source-reader

Conversation

@jscott3201

Copy link
Copy Markdown
Owner

Summary

  • add a capability-relative adapter that reads the unique source identities in a declaration-requirement projection
  • select release and development roots without fallback, preserve full identity and opaque bytes, and return documents in deterministic order
  • enforce inclusive document, per-file, and total-byte limits before unbounded allocation
  • hold opened file handles through metadata preflight and bounded reads, rejecting root escape, non-regular entries, growth, and inconsistent sizes atomically
  • add cap-std 4.0.2 for confined relative filesystem access

Scope

Callers remain responsible for opening and validating checkout roots. The reader does not run Git, inspect pins or inventory, authenticate checkout identity, hash bytes, decode UTF-8, parse Modelica, or inspect declarations. Existing syntax checking remains the sole blob and content authority. No pipeline/CLI integration, production artifacts, schema changes, or external repository work is included.

Validation

  • cargo fmt --manifest-path tools/routine-compiler/Cargo.toml -- --check
  • focused declaration-source tests (14 passed)
  • cargo test --locked --manifest-path tools/routine-compiler/Cargo.toml (109 passed)
  • cargo clippy --locked --manifest-path tools/routine-compiler/Cargo.toml --all-targets -- -D warnings
  • macOS capability tests, including external symlink escape rejection
  • full Python lint suite (189 passed) and production lints
  • G36 source inventory (431 release / 693 development files)
  • G36 declaration, routine, verifier, and full scenario gates
  • dataset harness (32 passed) and replay assertions
  • generated book build

@jscott3201 jscott3201 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cycle 1 consolidated review: PASS at 92407abb771feaf6484fa6df3144a02f117f3d09.

Both independent reviewers were blocker/major-clean. Deferred minor M1: full-identity deduplication uses bounded linear-vector membership, which can become quadratic at unusually high caller-selected document limits; current G36 scale and explicit limits make this non-blocking, so no code change is warranted in this PR.

Exact-head build and verify checks are green.

@jscott3201
jscott3201 merged commit ce9750e into main Aug 24, 2026
3 checks passed
@jscott3201
jscott3201 deleted the feat/rust-declaration-source-reader branch August 25, 2026 01:47
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.

1 participant