-
Notifications
You must be signed in to change notification settings - Fork 0
RFCs: structured execution contexts and manifest composition #600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7b0d277
8ec6253
85c2f23
94ff226
5b32baf
c3b95a2
287794f
86f236d
87e527d
280bc35
48523ff
90f9c5e
8f4839d
96aa87d
b0bb4ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -702,6 +702,72 @@ explicit, structured, and self-documenting nature. | |
| | Target Build | my_program: main.o utils.o\\t$(CC) $^ -o $@ | { targets: { name: my_program, rule: link, sources: [main.o, utils.o] } | | ||
| | Readability | Relies on cryptic automatic variables ($@, $\<, $^) and implicit pattern matching. | Uses explicit, descriptive keys (name, rule, sources) and standard YAML list/map syntax. | | ||
|
|
||
| ### 2.8 Manifest composition and bundle resolution | ||
|
|
||
| RFC 0003 defines deterministic resolution for versioned local bundles. The | ||
| following sequence shows how a manifest resolves, validates, and locks a | ||
| namespaced bundle. | ||
|
|
||
| For screen readers: The manifest asks the resolver to resolve a bundle source | ||
| and version. The resolver enumerates sorted catalogue candidates, selects the | ||
| highest compatible SemVer, validates parameters and exports, obtains the | ||
| canonical content digest, verifies the lock, and returns namespaced exported | ||
| declarations. | ||
|
|
||
| ```mermaid | ||
| sequenceDiagram | ||
| participant Manifest | ||
| participant Resolver | ||
| participant Catalogue | ||
| participant Bundle | ||
| participant Lock | ||
|
|
||
| Manifest->>Resolver: resolve bundle source and version | ||
| Resolver->>Catalogue: enumerate candidates in sorted order | ||
| Catalogue-->>Resolver: bundle descriptors | ||
| Resolver->>Resolver: select highest compatible SemVer | ||
| Resolver->>Bundle: validate parameters and exports | ||
| Bundle-->>Resolver: canonical content digest | ||
| Resolver->>Lock: verify selected version and digests | ||
| Lock-->>Resolver: lock status | ||
| Resolver-->>Manifest: namespaced exported declarations | ||
| ``` | ||
|
|
||
| Figure: Local bundle resolution and lock verification. | ||
|
|
||
| RFC 0004 extends this composition flow to external Git bundles. It preserves | ||
| the same verification boundary while adding exact reference resolution, | ||
| provenance, and content-addressed caching. | ||
|
|
||
| For screen readers: The manifest asks the Git resolver for an exact tag or | ||
| commit. The resolver fetches normalized Git references or a full commit, then | ||
| the verifier checks the subdirectory, metadata, SemVer, and canonical digest. | ||
| The verifier reads or publishes the verified content-addressed bundle, compares | ||
| tag, peeled-commit, and digest values with the lock, and returns a verified | ||
| bundle instance to the manifest. | ||
|
|
||
| ```mermaid | ||
| sequenceDiagram | ||
| participant Manifest | ||
| participant GitResolver | ||
| participant GitRemote | ||
| participant Cache | ||
| participant Verifier | ||
| participant Lock | ||
|
|
||
| Manifest->>GitResolver: resolve exact tag or commit | ||
| GitResolver->>GitRemote: fetch normalized refs/tags/... or full commit | ||
| GitRemote-->>GitResolver: Git objects and tag provenance | ||
|
Comment on lines
+758
to
+760
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift Keep external acquisition behind This sequence sends manifest resolution directly to 🤖 Prompt for AI Agents |
||
| GitResolver->>Verifier: verify subdir, metadata, SemVer, and canonical digest | ||
| Verifier->>Cache: read or publish content-addressed bundle | ||
| Cache-->>Verifier: verified content | ||
| Verifier->>Lock: compare tag, peeled commit, and digest | ||
| Lock-->>Verifier: lock verification result | ||
| Verifier-->>Manifest: verified bundle instance | ||
| ``` | ||
|
|
||
| Figure: External Git bundle verification and cache-backed lock resolution. | ||
|
|
||
| ## Section 3: Parsing and Deserialization Strategy | ||
|
|
||
| Once the Jinja evaluation stage has produced a pure YAML string, the next | ||
|
|
@@ -2353,6 +2419,35 @@ remains responsible for invoking Ninja correctly and, most importantly, for | |
| ensuring that the commands it generates for Ninja to run are constructed | ||
| securely. | ||
|
|
||
| ### Structured command working directories | ||
|
|
||
| RFC 0009 gives structured commands an explicit, capability-checked working | ||
| directory. The sequence below shows that resolution and validation happen | ||
| before the child process receives its `current_dir`. | ||
|
|
||
| For screen readers: The compiler provides a process specification with a | ||
| working directory to the action runner. The runner asks the workspace | ||
| capability to resolve and validate that directory, receives a | ||
| capability-relative directory, spawns the child process with that directory as | ||
| its current directory, and receives the process result. | ||
|
|
||
| ```mermaid | ||
| sequenceDiagram | ||
| participant Compiler | ||
| participant ActionRunner | ||
| participant WorkspaceCapability | ||
| participant ChildProcess | ||
|
|
||
| Compiler->>ActionRunner: provide ProcessSpec with cwd | ||
| ActionRunner->>WorkspaceCapability: resolve and validate cwd | ||
| WorkspaceCapability-->>ActionRunner: capability-relative directory | ||
| ActionRunner->>ChildProcess: spawn with current_dir(cwd) | ||
| ChildProcess-->>ActionRunner: process result | ||
| ``` | ||
|
|
||
| Figure: Capability-checked working-directory resolution for a structured | ||
| command. | ||
|
|
||
| ### 6.1 Invoking Ninja | ||
|
|
||
| Netsuke uses Rust's standard library `std::process::Command` API to configure | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use inline links for the RFC entries.
Replace the reference-style links at Lines 40, 43, 47, and 53 with inline Markdown links. Remove the unused definitions at Lines 71-74. Keep the existing descriptions and 80-column wrapping.
Triage:
[type:docstyle]As per coding guidelines,
docs/contents.mdmust list each document once with an inline link and an audience-focused description. As per path instructions, documents indocs/contents.mdmust use inline links.Proposed change
Also applies to: 43-43, 47-47, 53-53, 71-74
🤖 Prompt for AI Agents
Sources: Coding guidelines, Path instructions