Skip to content

docs: scope the record check to what its read path covers - #2471

Merged
abrichr merged 5 commits into
mainfrom
claude/nodb-docs
Nov 22, 2026
Merged

abrichr merged 5 commits into
mainfrom
claude/nodb-docs

Conversation

@abrichr

@abrichr abrichr commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Scopes the record check (layer 1) in the repository docs to what its read path covers.

Changes

  • THREAT_MODEL.md. Layer 1 no longer promises "exactly the declared effect and nothing else". A new section, "What layer 1 covers", covers three cases: a system-of-record read covers what that read path reads; with no database or API access the check covers the target record and the same actor's logged changes within a stated window; reads in the acting session never verify a run. VERIFIED means "as of the read-back time, the read showed this value", not "persisted". The wire check is evidence, not a check level. The owner rows for "writes elsewhere" and a hijacked agent are scoped the same way.
  • CAPABILITIES.md item 5 and README.md "What it can do". "Never just the screen" is replaced with the actual rule: VERIFIED needs a read outside the acting session, and the run report names the check level.
  • README.md summary and comparison table. The opening paragraph and the "Did the save land?" row no longer say every save is read from the system of record; the read is outside the acting session and the report names how.
  • 72-fault table (README, CAPABILITIES, packages/flow/README.md, LIMITS.md). The test database is SQLite with two record tables (encounters and billing). Every arm, the complete database read included, stopped 9 of the 18 correct saves (the timeout case).
  • openIMIS (README, CAPABILITIES, LIMITS.md). The 148 of 149 claims were read back by SQL through a read-only database role on a test copy.
  • LIMITS.md. Adds "What the guarantee covers without database access", plus a note after the wire-check section that the wire check is not a check level.
  • docs/proposed-web-copy.md. Draft corrections to data/site/pages/industries.mjs (openadapt-web 53f05758, lines 145, 160, 176 and 218), for approval. Nothing is applied to the website.
  • llms-full.txt rebuilt with scripts/build_llms_full.py.

These are docs changes only; no code changes. Level numbers follow packages/types/openadapt_types/check_level.py on main.

Rescope layer 1 in THREAT_MODEL.md, CAPABILITIES.md, LIMITS.md and the
READMEs. Without database access the check covers the target record and
the same actor's logged changes within a stated window. VERIFIED means
what the read showed at the read-back time, not that the value persisted.

State that the 72-fault table used a SQLite database with two record
tables and stopped 9 of the 18 correct saves in every arm, that the
openIMIS claims were read back by SQL, and that the wire check is
evidence, not a check level.

Add docs/proposed-web-copy.md with draft website corrections for approval.
Rebuild llms-full.txt.
@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Gemini
Reviewed-Head: 8fdc710

Blocker

  1. Internal cross-repo copy proposal committed to public docs/ (docs/proposed-web-copy.md, +85 lines). This file is an editorial proposal for openadapt-web (referencing tests/siteRegistry.test.js:86, "Proposed row:", "Line 218: dental page description (remove)"). Internal process/copy proposals for another repository should live in openadapt-internal or an openadapt-web PR, not in the public OpenAdapt repo. Remove docs/proposed-web-copy.md from this PR.

Verified (looks good)

  • The technical scoping edits in THREAT_MODEL.md, LIMITS.md, CAPABILITIES.md, README.md, packages/flow/README.md, and llms-full.txt accurately bound Layer 1 guarantees to what the read path observes, clarify the 2-table SQLite scope and 9/18 timeout false stops in EFFECT_E2E.md, and note that the openIMIS 148/149 result used a read-only SQL role.

Generality & durability

  • No per-app engine code. Pure documentation scoping of the verification contract; no new runtime evidence claimed.

@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Codex
Reviewed-Head: 4fbd7a2

Codex run on 4fbd7a2 (read-only sandbox, blockers only, diff against the merge base excluding llms-full.txt).

Blockers reported:

  1. README.md:20, 315, 324 and LIMITS.md:695 promise an outside-session read and a reported level for every save. A Standard run can reopen the record in the acting session and finish COMPLETED_UNVERIFIED; a legacy save with no declared effects can execute on a screen postcondition alone, and readback_ladder.py:150 omits that step from the ladder (tests: test_pixel_only_citrix_verified_refusal.py:53, test_replayer_effects.py:410).
  2. CAPABILITIES.md:60-63 says a VERIFIED UI read implies a separate sign-in. The desktop fresh_session verifier accepts an app relaunch with no sign-in steps on the acting backend and still assigns INDEPENDENT_SESSION (fresh_session.py:108, 171, 240).
  3. LIMITS.md:687 and THREAT_MODEL.md:45 promise coverage of the actor's logged changes whenever the app has an audit log. The history view must be configured; in the OpenEMR UI second-read benchmark (F6a/F6b) the target-only read returned CONFIRMED despite a collateral edit (ui_readback.py:1582, benchmark/ui_second_read/RESULTS.md:39).
  4. README.md:85-88 and LIMITS.md:681-683 make a separate session the strongest check without database (or API) access, but a scheduled export of committed data can supply level 4 (docs/RECORDS.md:95, check_level.py:12). The level-3 ceiling applies only when the UI is the only independent read path.
  5. THREAT_MODEL.md:74 says the wire check refuses undeclared writes wherever requests can be intercepted; it allows GETs classified as reads, and state-changing GETs are documented as outside its protection (wire_check.py:222, LIMITS.md:484).
  6. docs/proposed-web-copy.md:60 offers "Checked in a separate session" whenever a portal allows a second login; a qualifying read also needs a fresh server query and a distinct record view (ui_read_checks.py:135; F7 was INDETERMINATE).
  7. README.md:83-85, CAPABILITIES.md:518-520 and packages/flow/README.md:449-450 attribute the nine false stops to each read-back check; the write actuator halted on timeout before any read-back verifier ran, so the count measures end-to-end run outcomes (EFFECT_E2E.md:102).
  8. README.md:48 and CAPABILITIES.md:546-547 say each of the 149 claims was read back; item 66 stopped before saving and returned missing on all three attempts, so the evidence supports 149 attempted and 148 saved claims read back.

Out of scope: none listed.

VERDICT: REQUEST CHANGES

@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Gemini
Reviewed-Head: feda6e4

Gemini run on feda6e4 (gemini-3.1-pro-preview). Codex was the intended reviewer for this round, but the Codex run on this head failed on a usage limit before producing a review, so this round fell back to Gemini.

Scope and method: blockers only (correctness, fail-open wording, security, broken tests, claims not backed by code), with the diff against the merge base (excluding llms-full.txt). Gemini cannot browse the repository, so it was given excerpts of the evidence files the round-1 blockers cited: check_level.py, runtime/effects/fresh_session.py, readback_ladder.py, runtime/effects/ui_readback.py, runtime/effects/ui_read_checks.py, wire_check.py, benchmark/ui_second_read/RESULTS.md, docs/RECORDS.md, docs/LIMITS.md (wire-check limits), benchmark/effect_e2e/EFFECT_E2E.md and the openIMIS item-66 rows. It was asked to check whether the eight round-1 blockers are resolved and whether any new blocker exists.

Changes in feda6e4 that answer round 1:

  1. Every-save claims now say a run is reported verified only when a read outside the acting session confirms it, weaker checks are reported at their own level, and the ladder covers saves with a declared read-back. Legacy steps with no declared effect are named as not graded.
  2. A separate session is described as a fresh sign-in on the web, or a fresh session or app relaunch on desktop, as the deployment declares.
  3. Audit-log coverage requires the program to be set up to read the log. LIMITS notes that with no audit view declared, a collateral edit is not seen.
  4. The level-3 ceiling applies only where the app's own screens are the only independent read. A readable log or export can still give level 4 (RECORDS.md).
  5. The THREAT_MODEL hijacked-agent row notes that a state-changing GET classed as a read is not refused.
  6. The draft web copy requires the second read to load the record fresh from the server.
  7. The nine timeout stops are described as happening in every arm before any read-back ran, as end-to-end run outcomes.
  8. openIMIS now says each saved claim was read back by SQL, and the 149th stopped before saving.

Review result: Gemini reported no blockers. Doc tests (tests/test_shipped_only_copy.py, tests/test_cli_documented_tasks.py, packages/flow/tests/test_capabilities_map.py) passed 12 of 12 locally, and scripts/build_llms_full.py was rerun with its output committed.

VERDICT: APPROVE

@abrichr abrichr closed this Nov 22, 2026
@abrichr abrichr reopened this Nov 22, 2026
@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Claude
Reviewed-Head: 4cc8241

Head confirmed (gh pr view headRefOid and the fetched pull/2471/head both resolve to 4cc82415). The diff covers 7 docs files and changes no code. None of them falls under a path in .github/agent-safety-manifest.json, so no cross-vendor review is needed. No prospect names, vendor costs or roadmap copy.

The PR narrows claims; it doesn't widen them. I checked each new claim against the code on this head:

  • Check levels. The level numbers and names (3 separate_session, 4 system_of_record, acting-session reads at 1 and 2) match packages/types/openadapt_types/check_level.py. VERIFIED_EFFECT_TIER = INDEPENDENT_SESSION in verification.py, and both agent_guard/readback.py:113 and run_ledger/store.py:333 refuse VERIFIED below independent read-back. "The run report names the level" matches ReadbackLadder (minimum, checked_how, saves) in ir.py, which is written to report.json.
  • Separate session and audit view. runtime/effects/ui_read_checks.py requires a separate session, a fresh request and a distinct view. Its HistoryView reads the activity log before and after the save, excuses other users' entries, and refutes an undeclared entry about another record. That supports "the target record, plus the same actor's logged changes within a stated window where the app shows one and the program is set up to read it."
  • 72-fault table. EFFECT_E2E.md describes on-disk SQLite whose mutable surface is encounters and billing. The timeout row is false-abort in every arm, which is the 9 of 18 correct saves stopped ("50.0% (9)" of 18).
  • openIMIS. scoreboard/tasks/openimis.py reads claims as oa_claims_reader. That role has default_transaction_read_only = on, REVOKE ALL, and SELECT on four tables only; claims_verifier is a SqlRecordVerifier over it. The item that didn't read back correct, record 66 in launch-4-c100, halted before the save step (readback_rows 0), so "the 149th stopped before saving" holds.
  • Wire check. The THREAT_MODEL row about a state-changing GET matches LIMITS.md ("An app whose GET addresses change records ... is outside the wire check").

Findings (none is P0 or P1):

  • P2: "never" is slightly stronger than the code. THREAT_MODEL and CAPABILITIES say acting-session reads "never make a run VERIFIED". ExecutionProfileContract.reopened_counts_as_verified (execution_profiles.py:88-92, used by verified_tier_floor) lets a profile count reopened toward VERIFIED. No built-in profile sets it, so the sentence holds for every shipped profile. Consider "with every built-in profile", or removing the hook, so the doc and the code can't drift apart.
  • P2: docs/proposed-web-copy.md in a public repo. It is a draft for approval, with website file and line references and "for approval" process notes. It contains nothing unreleased or sensitive. Still, internal review drafts usually live in notes rather than the public tree. Consider moving it out before merge, or deleting it once the website change lands.
  • P3: "a log" as level 4. CAPABILITIES lists "a log or an export" under the system of record. The check_level.py docstring says "file, or an export of committed data made by a separate process". LIMITS.md says it more carefully ("readable log or export of committed data, which can still give level 4"). Saying "a log of committed data" in CAPABILITIES too would match.

@abrichr
abrichr merged commit decf734 into main Nov 22, 2026
56 checks passed
@abrichr
abrichr deleted the claude/nodb-docs branch November 22, 2026 23:18
abrichr added a commit that referenced this pull request Nov 23, 2026
#2518 split the page into capabilities/ row files from main as of 17:13 EST.
Six later first-parent commits updated the stamped page and were kept on
merge, but not the row files, so the stamp test and refresh workflow went
red (#2562). Fold those edits into the sources and regenerate the stamp.
CAPABILITIES.md is unchanged.

- #2471: VERIFIED-run prose; fault-test and openIMIS measured-results notes
- #2477: grade file/PDF/email checks by artifact provenance
- #2472: api_recheck row
- #2397: GraphQL / probe_read_routes text on the transaction-lens row
- #2363 / #2368: second-factor row, including terminal/Windows console

Fixes #2562
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant