Repository navigation
fix(kernel): harden read-back, commit gating, settle, filters, probe/ACI, qualify, and receipts - #2713
Merged
Conversation
…ACI, qualify, and receipts
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.
Summary
Fixes 7 runtime verification defects in
packages/kernelwhile staying under the 3,200 LOC budget (3,187 LOC total) with zeroopenadapt_flowimports:oracles.py): Scopeverify_cross_tab_domto the mutated target tab/origin so a source/reference tab cannot satisfy a write. Extract labeled DOM controls/definitions/tables and require field/label bindings for 1–2 char values (e.g.,"1","CA") instead of bare free-text substring matches.VERIFIED(runner.py,interceptor.py): GateVERIFIEDon either an observed target-origin mutating HTTP2xxresponse (POST/PUT/PATCH/DELETE) or a pre-click-absent -> post-reload-present target-field transition. A no-op click over stale DOM text no longer returnsVERIFIED.interceptor.py,runner.py): Replace the hardcoded300 mssleep before reload withCommitInterceptor.wait_for_commit_settle, waiting for in-flight target-origin mutating requests and a shortMutationObserverDOM quiet window (default5000 mstimeout).interceptor.py): Restrict search-box filtering to explicit attributes (type="search",role="searchbox") and word-boundary search/filter terms so fields like"Clinical findings"and"Sort code"remain tracked. Restrict telemetry ignorelists to explicit analytics hosts and exact path segments soPOST /api/collections/...is not dropped.run_portal_pack(probe.py,runner.py): Gate pre-click safety onfocus_respondedinprobe_before_clickand updateOnlineACICalibratorfrom Level-2/3 read-back ground truthY_tinsiderun_portal_pack.qualify(copilot.py,cli.py,mcp_server.py,extension_bridge.py): Remove the constant default"Draft form before submission"string and raiseValueErrorwhen no captured pre-write snapshot is provided via argument orpre_writeevidence event.copilot.py,ledger.py,runner.py,registry.py,cli.py,mcp_server.py): Defaultmint_receiptto zero-PHI redacted mode (SHA-256 hashes of typed values + origin host only, withinclude_plaintext_values=Falsedebug opt-in), sign every terminal outcome (VERIFIED,HALTED,FAILED,PREPARE_REQUIRED,ESCALATED), and default episode IDs to unique UUIDv4s instead of"ep-live-1".< 2,800LOC claim inpackages/kernel/README.mdto< 3,200LOC to match the CI boundary guard.Verification
packages/kernelsource LOC:3,187(< 3,200budget)python3 scripts/check_legacy_flow_freeze.py: passedruff check src tests: passedpytest -q(packages/kernel):29 passed(including 7 new regression tests intests/test_kernel_hardening.py)