Repository navigation
v1 runtime batch - #330
Merged
Merged
v1 runtime batch#330
Conversation
…R-4e) Lower f-strings holding a string literal before ast.unparse, so the rendered runtime is byte-identical and parses on 3.11 on every supported interpreter. Adds a render test on the running interpreter, a 3.11 parse check and a cross-interpreter byte comparison. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…s record changed (SR-4f) A merged plugin binds each session, by the session log's id, to the toggle files and records it first sees. If one changes during the session every member stays on until the next session. The session-start hook binds the session and lists every member that is off, by scope; the Stop-time check refuses a turn's end while a file changed during the session switches a member off. Docs state a toggle is not a security boundary against an agent running as the person. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…t (SR-4f) Move the toggle file's format, its record and the session binding into a sibling module shipped beside the wrapper; bind a session in the user's state folder so a change of directory cannot start a new binding; keep the docs free of paths that do not exist in this repository. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…licate helper (SR-4f) The built-in protection now refuses an agent's shell or Edit/Write change to a session's binding (guardrails-session-*.json under .chock/state/), so a session cannot be rebound to match a forged toggle. Remove the duplicated _states in the toggle wrapper. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
find_bash now runs a fixed script and hands it the guard path as $1, so a path holding shell syntax is probed as plain text. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…dows (SR-8a) The write gate, the MCP gateway's path check and the outside-repository globs compare forbidden-path patterns and scope globs case-insensitively where the filesystem ignores case, so a protected file that does not exist yet is covered too. A case_blind override makes the behaviour testable on any platform. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
The golden records the hook command the Linux CI job builds; a build on Windows writes the cmd.exe form instead, which has its own tests. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
jothimani-rajendran
marked this pull request as ready for review
October 26, 2026 01:41
Both record the session-start wrapper and the shipped chock_bundle_state.py that SR-4f added; their test file was not in the batch sync's list. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
The main ruleset requires the head to be up to date before a merge; the merge brings nothing the rc branch does not already carry. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
jothimani-rajendran
added a commit
that referenced
this pull request
Oct 26, 2026
The main ruleset requires the head to be up to date before a merge; the merge brings nothing the rc branch does not already carry. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
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.
Batch branch for the remaining runtime-touching hardening. Each item lands as its own commit(s); the owner syncs the compiled runtime and goldens once at the end of the batch.
Items
ast.unparseon 3.12.0 to 3.12.x writes same-quote nested f-strings that are a SyntaxError on 3.11; the renderer now lowers any f-string holding a string literal to''.join([...]), so the output is byte-identical and parses on 3.11 on every interpreter. Addstests/test_runtime_render_portable.py.offin.chock/guardrails.jsonor~/.chock/guardrails.jsonis honoured only by a session that started after that file's record last changed. A merged plugin binds each session, by the session log's id, to the toggle files and records it first sees; if one changes during the session every member stays on until the next session. The session-start hook binds the session and lists every member that is off, by scope. The Stop-time check refuses a turn's end while a file changed during the session switches a member off. The built-in protection (never toggleable) also refuses an agent's shell or Edit/Write change to a session's binding file. The docs state that a toggle is not a security boundary against an agent running as the person; interactive confirmation is a later item. No new secret or key. Addstoggle_state.py(shipped beside the wrapper) and tests for the binding, the turn-end check and the protected binding file.case_blindoverride (stdin key to the runner, keyword onevaluate_gate,judged_filesand the gateway'sjudge/evaluate) makes it testable on any platform; the default is the platform's. The bash probe inguard_runner.find_bashnow receives the guard path as an argument instead of building it into the shell string. Addstests/test_case_blind_gates.pyand a probe test intests/test_bash_discovery.py, plus two changelog fragments. Worked against v1-runtime as it stands:gate/repo_names.py(SR-3) is not on this branch and arrives at rc.3, so this item does not use it.More items will be added here.
Expected CI state
Compiled drift and runtime goldens (including the plugin-target goldens, which now list the session-start wrapper and the new shipped module) are red until the single sync; no goldens or
.chock/files are committed here. SR-8a also changes the runner, sotests/test_runner_selfcontained.py::test_vendored_gate_py_matches_sourcejoins them until the sync.