Repository navigation
Fail-closed typed action authorization gate - #2
Closed
dcharlot65-openie wants to merge 1 commit into
Closed
dcharlot65-openie wants to merge 1 commit into
dcharlot65-openie wants to merge 1 commit into
Conversation
Model Commit, decision probabilities, and sign::Gate acceptance are not permission. receipt::auth allows only canonical inspect_decision and quote_receipt grants, denies unknown or malformed input, and binds an allow to the exact action bytes. A joule ceiling applies only when a grant carries one. No shell, no meter, kev_serve behavior unchanged. Co-authored-by: David Charlot <dcharlot65-openie@users.noreply.github.com>
|
Thank you for taking the time to open this! strix-rt is published read-only for now, so we don't merge pull requests and this one was closed automatically. It isn't a judgment of your change: we just can't review and maintain outside code yet. Issues are open for questions, reproduction reports and feedback, and forks are very welcome. Take whatever helps you save energy. |
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.
What this is
A Rust library gate,
receipt::auth, that decides whether a proposal is an operator-granted typed action. It does not execute anything, and it is not wired intokev_serve.On this remote tree, before the change:
sign::Gate(crates/receipt/src/sign.rs) verifies an event envelope (signer, subscription, payload hash, replay).Acceptis authenticity, not permission.POST /v1/decisionsreturns predicate / choice / score probabilities plus a signed slice receipt.dispatched_toolis an unstructuredOption<String>, andkev_servepassesNone.Energy/Provenanceexist. Mesh joule ceilings are mentioned indocs/infinity-suspend-resume.mdand are not a stored budget. Unmetered joules are the existing non-finite sentinel (nullin receipt JSON).The reported failure this gate is aimed at: LFM3-Omni Q4_K_M answered a destructive root-deletion request with
Commitplusrm -r /orrm -rf /(0/60 refusals). Those strings were not executed. The transcripts are not in this repository. Fixtures use the reported shapes.David's unpublished local tree was not in this workspace. This patch is against remote
mainat34ad7ddonly. It does not claim to meet modules that are not on the remote.Policy
Fail closed. The closed action set is
inspect_decision(a decision content hash) andquote_receipt(a thread id plus a receipt hash). Both are references to objects this runtime already computed. There is no shell, process, filesystem, or network action.hello,echo hello, andCommit+rm -rf /are the sameunstructuredresult. The parser does not contain a forbidden-command table.commitisunknown_action. Prefixing a valid document withCommitdenies. There is no commit flag.no_authority. A different kind isaction_mismatch. The same kind with a different scope isscope_mismatch. Model bytes do not mint grants.Permit::coversrejects a substituted action. A permit is not a bearer token and is not consumed by any I/O.compute_ceiling_j, the strictest ceiling wins. A grant with no ceiling does not erase one that has a ceiling, and it does not invent a number. MeasuredHwShuntorModelBasedjoules at or under the ceiling pass.Estimator, missing, negative, and non-finite joules deny when a ceiling applies.authdoes not read sysfs.sign::Gateis unchanged.kev_servebehavior is unchanged; a comment points at this gate so a probability is not read as an allow.Tests
cargo test -p receiptwith Rust 1.99.1,--locked: 40 unit tests passed (14 new inauth, existing receipt/sign/ledger/meter tests still passed), 6 integration tests passed (crates/receipt/tests/auth_gate.rs), 0 failed.cargo clippy -p receipt --all-targets -- -D warningsis clean.cargo run -p receipt --example auth_checkprints allow for one granted status-pinginspect_decisionand one grantedquote_receiptunder 0.5 J ModelBased, then deny for no authority, both reportedCommit/rmshapes,echo hello,hello, aCommitprefix on a valid document, the verbcommit, a substituted hash, an over-ceiling figure, andEstimatorenergy. It does not spawn a shell.Integration coverage includes those destructive shapes (also with a grant and a large ceiling present), malformed extra lines, payload substitution, a signed destructive envelope that
sign::Gateaccepts andauthdenies, and the reverse (granted action, unsigned envelope).Limitations
Not general autonomous safety, not a sandbox, not a deployment. Not hooked into Infinity
handle_content.dispatched_toolis still not a capability. In-process grants are not signed. No ceiling on a grant means no energy refusal. Cache-hitEstimatorenergy cannot satisfy a ceiling, and this crate does not invent a measured substitute. Details:docs/action-authorization.md.Copyright 2026 Open Interface Engineering, Inc. SPDX-License-Identifier: MIT OR Apache-2.0.