Skip to content

batch: repair, safety, teaching agents and evidence (#1375 #1360 #1359 #1354 #1335 #1357 #1298 #1291 #1346) - #1384

Merged
abrichr merged 97 commits into
mainfrom
batch/repair-safety-agent
Oct 20, 2026
Merged

abrichr merged 97 commits into
mainfrom
batch/repair-safety-agent

Conversation

@abrichr

@abrichr abrichr commented Oct 19, 2026

Copy link
Copy Markdown
Member

Batch merge of nine reviewed PRs, so CI runs once instead of nine times. Merging this marks each one merged, because their commits land on main.

Included:

Conflicts resolved while batching:

  • .gitleaksignore and CAPABILITIES.md rows: both sides kept, no duplicate rows.
  • Generated files (inventory, verification report, command list, llms-full): regenerated.

Public copy now lists only shipped work: "In review" and "In progress" rows read "On main", and the status words in README, llms.txt and the agent README are gone. #1338 makes the same edits to main's copy.

Locally:

  • the capability map and release consistency checks pass;
  • llms-full is current;
  • gitleaks finds nothing in the new commits;
  • the name guard is clean.

If CI fails here, the failing PR is taken out of the batch and the rest merge.

🤖 Generated with Claude Code

abrichr and others added 30 commits October 18, 2026 14:29
The transcript is scrubbed with openadapt-privacy before it is stored, and
recording refuses before the microphone opens when no scrubber is installed.
Scrubbed sentences go to narration.json on the recording clock; per-word text
is no longer stored. capture transcribe scrubs too. Synthetic WAV fixture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…certify them

A sentence lined up near a branch point (an optional step or a two-path
divergence) is parsed into a guard on a recorded field or a screen element.
It certifies only when every recording agrees or a person accepts it; a
contradicting recording keeps the point refused. Certified guards carry their
sentence in Workflow.guard_sources. Narration sidecar, alignment, attach, and
capture-adapter carry-over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion CLI

induce --probe-on also replays the narrated reading where narration proposed
a guard nobody contradicted; it certifies when that reading produces every
recorded effect and dropping the step does not. induce --accept-narrated
LOCATION --accepted-by NAME, --narration-model (opt-in, own key). New
narration attach/show command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ion in teach-branch

visualize (HTML, Mermaid, JSON) shows each guard with the sentence that
suggested it and what certified it; non-local profiles drop the sentence.
teach-branch uses a narrated sentence to pick the narrowing parameter only
when every example and normal run agrees. repair show lists the sentences.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- check a param guard against the recordings with the runtime's exact compare
- leave a divergence refused when another step sits inside it, and insert
  branches at the same position in column order
- pin acceptances and probe results to the guard id (LOCATION@GUARD_ID)
- accept only a JSON boolean from the model, and screen text the person said
- parser: stop at 'otherwise', flip 'it's not X', read 'isn't needed' as skip,
  drop double negatives and unplaced negations
- skip a malformed narration.json instead of failing
- link the capability row to #1291

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the browser sees the server answer a save request (POST, PUT, PATCH,
DELETE), the replayer keeps the answer on the save step
(StepResult.server_responses) and the receipt counts it (server_responses:
observed, 2xx, check_level same_screen). Kept: method, status, a digest of
the endpoint (no query string), a digest and size of the body, the media
type. Never a body, URL, header or value.

The answer comes from the same transaction as the save, so on its own it
never confirms an effect and never makes a run VERIFIED; the configured
verifier still decides. Results and receipts without answers keep their
exact bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Keep only method, status and media type: no endpoint or body digests
  (a digest of a short path or body can be guessed).
- Never read a response body, so a streaming answer can't hold up a run.
- Count only the page's own fetch, XHR and form writes to its origin, sent
  after the save began; never beacons, other origins, requests already in
  flight, or service-worker answers.
- "Not an error" is a status below 400: a form save often redirects.
- Keep up to 64 answers per step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ventory

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	packages/flow/docs/VERIFICATION.md
#	packages/flow/docs/verification.json
#	packages/flow/openadapt_flow/receipt.py
#	packages/flow/public-artifacts.json
# Conflicts:
#	CAPABILITIES.md
#	packages/capture/README.md
#	packages/flow/openadapt_flow/ir.py
# Conflicts:
#	packages/flow/docs/VERIFICATION.md
#	packages/flow/docs/verification.json
#	packages/flow/public-artifacts.json
Regenerate the public artifact inventory for the changed visualize files,
apply ruff format, and fix three mypy errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The page gets no request/response listeners until a save step marks the
log (nothing earlier is kept anyway), so a page that never saves keeps the
exact listener set it had, and the mask-tracking teardown check holds.
close() removes the listeners. Masking is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
openadapt-agent serve --teach VERIFY_YAML adds teach_start, teach_observe,
teach_act, teach_screen, teach_finish, teach_abort, teach_status,
teach_confirm_checks and teach_admit. The connected agent is the inner agent
of compile-agent's FirstRunCompiler (compile_agent.driven.DrivenRun): run 1
goes through the same harness and save gate, the record check reads the
system of record, a person confirms the proposed check in the client's form,
and teach_admit admits only as the registered agent the operator configured,
under a person-signed policy (self-admission needs allow_self_admission).
An admitted program joins list_workflows and run_workflow and gets a
taught_<name> tool; the server sends tools/list_changed.

FirstRunCompiler takes surface= (a deployment backend section) and uses a
new SurfaceHarness off the web: same gating, and a person approves every
gated action because the harness can't read which record a form shows.
openadapt-flow compile-agent admit TASK_DIR is the person's terminal path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the web

Review fixes for the MCP teach tools:
- An approval covers one run, one exact action and the app as it was
  (run id, action, actions performed so far). A changed screen, another run
  or another action in between refuses it; nothing is done.
- Off the web, every click is gated unless it is on a ref'd text field,
  check box, tab or a plainly navigating control; clicks at x,y, Enter,
  typing outside a text field, single-letter keys and shortcuts are gated.
  Focus resets after Tab and other focus keys, so Space after Tab is gated.
  The gate uses the ref's control, not a coordinate match.
- On the web, typing a space on a focused button is gated.
- type with a ref refuses a ref that isn't a text field.
- An action that times out ends run 1 instead of running later.
- A run that fails to start stays tracked until its thread ends.
- One app lock for run 1, canaries and taught runs.
- The server stops an unfinished run 1 on exit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ests)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…idence

# Conflicts:
#	packages/flow/openadapt_flow/backends/playwright_backend.py
#	packages/flow/openadapt_flow/runtime/replayer.py
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
abrichr and others added 14 commits October 19, 2026 18:54
# Conflicts:
#	CAPABILITIES.md
#	packages/flow/public-artifacts.json
… content

The new Effect field entered every serialized workflow.json, so bundles
sealed before it no longer matched their content digest (registry pull,
loop showcase, and the pinned pre-field digest test failed in CI). It is
now a reviewed sealed-canonical omission when False, like new_records and
identity_field; a contract that turns the check on stays sealed content.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	packages/flow/public-artifacts.json
# Conflicts:
#	llms-full.txt
# Conflicts:
#	llms-full.txt
# Conflicts:
#	CAPABILITIES.md
#	llms-full.txt
# Conflicts:
#	.gitleaksignore
# Conflicts:
#	llms-full.txt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	CAPABILITIES.md
#	llms-full.txt
@abrichr
abrichr merged commit a1fdd5f into main Oct 20, 2026
60 checks passed
@abrichr
abrichr deleted the batch/repair-safety-agent branch October 20, 2026 02:18
abrichr added a commit that referenced this pull request Oct 20, 2026
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