Repository navigation
Tidy-up after #1542: amendment-number note, bridge docstrings, bridge contract test - #1779
Merged
Merged
Conversation
…run in MCP fallback, bridge contract test
Member
Author
|
Coordinator review: diff checked. Engine changes are docstrings and MCP fallback text only (browser_teach.py, mcp.py, verify_tools.py); the rest is the PROTOCOL renumbering note and two new tests (bridge-contract build test, read-back volatile-field test). No behaviour change. CI green. Approve and merge. |
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.
Non-blocking notes from the delta review of #1542. No behavior changes.
Changes
PROTOCOL.md: the renumbering note was inside the body of pre-registered Amendment 11. It is now its own short note before the amendments. It says old Amendment N is now N+1, and it names the three files that still use the old numbers: the two2026-10-25-rb*runmeta.jsonfiles andHAND_REVIEW.md. Those files are not edited. No amendment's rules changed.BrowserTeachBridge.hold_neededandVerifyBridge.hold_needed: the docstrings said the tool could beteach_run. Neither bridge offers it. They now say the bridge has no person holds andtoolis ignored.BrowserTeachBridgeclass docstring: "none can change data" was stale since write contracts (feat: verified writes for any agent, and taught browser writes with receipts #1589). It now says that without a contract nothing can change data, and with one the wire check lets only the contract's writes out.instructionsnow namesteach_run(web apps) next toteach_act.tests/test_mcp_teach_bridge_contract.py: builds each real teach bridge (TeachBridge,BrowserTeachBridge,VerifyBridge) intobuild_server, callsteach_actandteach_runthrough an in-memory MCP client, and checks thathold_neededgetstool=with no internal failure. It also binds the signature for both tool names. Withtoolremoved fromBrowserTeachBridge.hold_needed, the test fails.Finding: volatile fields in the read-back
New
tests/test_readback_volatile_fields.pyrunsRecordReadBackon the realload_observerpath against a local FHIR server whose resources get a newmeta.lastUpdatedandmeta.versionIdon every read.field_paths, meta fields are not mapped, so the read-back never sees them. The save reads back aslanded.meta.lastUpdatedormeta.versionIdinfield_paths, run 1 stops aswrong_record, although only a read changed the starting record. This fails closed, but it is a false stop.records_drop_fieldsremoves the field, and the save then reads back aslanded.db_snapshotis not a read-back source.load_observerhas no kind for it; only the contract frame uses it, and it has its ownignore_columns. So the read-back can't give a false stop there.Follow-up: the read-back can give a false
wrong_recordon FHIR when a mapped field changes on every read. A possible fix is to refuse, or warn about,meta.*paths in a run-1 verifier unless they are inrecords_drop_fields. Nothing in this PR changes that behavior.Tests
pytest -n 2on the two new files plustest_verify_tools.py,test_browser_teach.pyandtest_mcp_teach_cli.py: 44 passed. Ruff check and format pass on the changed files.