Repository navigation
Conversation
An app that sends every read and write as a JSON-RPC POST to one path had
no lens: a GET template can't read a record back, so every update stopped
before the agent acted, and induction found nothing to learn from.
EndpointTemplate gains three data fields:
- body_template: the JSON body, with {id}, {id:int} and {payload}
placeholders, for reads and writes that carry their arguments in the
body;
- record_path: a dotted path with list indexes (result.0) to the record;
- error_path: a member that, when non-null, makes a 2xx answer a failed
call. Without it, a live RPC app's 200 answer to a write of a field that
does not exist looked like success.
Induction takes RPC roles from effects, as for REST: a read names ids and
a field list and returns exactly those records; a write names one id and
values that a later read of the same model shows. The read-back template
reads the union of the fields the trace read for that model, so the frame
is what the app itself reads. A field the server changed between reads
without being asked is volatile. An RPC trace with no confirmed write is
refused.
Live on a local Tryton 7.0 (synthetic party records): the induced lens
reads the party back, the engine's write changes only the intended field
(UNCERTAIN with unqualified_observation_only, checked by the test's own
read), write_date is learned as volatile, and an RPC error inside a 200
is a failed write.
Signed-off-by: abrichr <richard.abrich@mldsai.com>
Independent adversarial review: APPROVEFrom: Grok The new lens fields are sound and fail closed. Residuals, not blocks: confirmation checks that a later read contains the values, not that they changed from a prior read, so a call whose dict already matched the record could be learned as the write method (execute still fails closed if that method does not actually write). IDs are induced only as integers. If at least half of the POSTs look like successful RPC calls, induction does not fall through to REST, and a mixed trace with no attributable RPC write is refused. Live tests are skipped unless Do not merge: stacked on #2404 / #2393, and the request was review only. Pointer: openadapt-internal#211 |
# Conflicts: # CAPABILITIES.md # llms-full.txt
Independent adversarial review: APPROVEFrom: Claude (independent reviewer) No blockers.
|
# Conflicts: # CAPABILITIES.md # llms-full.txt
Independent adversarial review: APPROVEFrom: Claude (independent reviewer) The only new commit since the approved head
Merge-order note: #2397 also edits this row. Whichever of the two lands second will need the same kind of row merge. |
Independent adversarial review: APPROVEFrom: Gemini Independent cross-vendor adversarial review of Findings & fail-closed verification
Generality gate
|
# Conflicts: # CAPABILITIES.md # llms-full.txt
Independent adversarial review: APPROVEFrom: Gemini Verified clean merge with
|
Stacked on #2404, which is stacked on #2393 (base
claude/tx-induce-refuse-no-item-route). Retarget it tomainafter those merge. With #2393 and #2404 it completes #2390.Problem
The real-app benchmark's held-out ERP sends every read and write as a JSON-RPC
POSTto one path. Three things failed on it:BLOCKED_PRECOMMITbefore the agent acted.errormember. On a live Tryton, writing a field that doesn't exist returns200 {"error": [...]}.Change
EndpointTemplategets three data fields (no engine code names an app):body_template: the JSON body, with{id},{id:int}and{payload}placeholders;record_path: a dotted path with list indexes, such asresult.0;error_path: when the value at this path is non-null, the call failed.LensHttpResponse.okis then false, andcall_errorholds the value.InductionRefused.Known limits:
Tests
tests/test_tx_rpc_lens.py, in CI (local server speaking the envelope), 7 tests:OAFLOW_TX_LIVE_RPC_URL,_USER,_PASSWORD). Both tests pass:write_dateis learned as volatile.code, confirmed by the test's own read. The result isUNCERTAINwith onlyunqualified_observation_only.200 {"error": ...}answer is a failed write.Not in this PR
Classifying the same endpoint's read calls on the wire, so the tap's budget isn't used up, is #2397's
ReadRoutewith amethodbody discriminator.