feat(compiler): add offline advisory consultation packets - #14
Draft
joehertel wants to merge 1 commit into
Draft
Conversation
Add an explicit, optional packet protocol for exporting bounded compiler context to an external reviewer and validating returned advisory findings. The compiler does not dispatch a model, access the network, execute advice, or perform canonical writes. Packet and response validation fail closed on schema, digest, path, constraint, provenance, and status-semantics errors.
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.
Why
This adds a narrow way to consult an external reviewer during implementation or validation without making model access part of compilation.
The compiler emits a deterministic, digest-bound request packet. A separate process may obtain advice offline, and Weft can validate the returned packet. Advice remains non-executing and non-authoritative.
CONTRIBUTING.mdasks larger compiler changes to start with an issue. I am opening this as a draft so the exact implementation is reviewable, not asking for merge yet. If an issue-first discussion is preferred, I am happy to move the design conversation there.This targets
mvpbecause the implementation was built and tested againstmvp@786bf97ae5a842452b69c900b785c8ee35c7d0a5.What changed
adviceandblocked; forbid findings forabstainweft-codex-consult emitand non-executingverifycommandsSafety boundary
This PR does not:
Validation
cargo test -p weft-compiler --test codex_consultationcargo test -p weft-compiler --test codex_consultation_clicargo test -p weft-core -p weft-compiler --lockedcore.autocrlf=falseClippy disclosure
cargo clippy -p weft-compiler --lib --bins --tests --locked --no-deps -- -D warningsremains nonzero on existing workspace diagnostics. The captured run reported no diagnostics in the consultation-owned source, binary, or test paths.Review focus
I would especially value feedback on whether this packet boundary belongs in
weft-compiler, and whetherblockedrequiring at least one explanatory finding is the right closed semantic.