Commit Graph
4026 Commits
Author SHA1 Message Date
Edgar ArakelyanandClaude Opus 5.5 f4cc4fdb14 test(environment): cover list queries; move call line selection to its own module; document queries
- Unit tests for each role, merging and refusals; a gate test learning
  a filter, a search, a sort and an inert flag; serving tests for new
  filter, search and sort values and an unrecorded inert value.
- A `-name` sort descended only after the name had matched loosely
  without its sign; the sign is now read first.
- Search fields leave out URLs that merely repeat the term.
- The functions that choose the line a call answers on move to
  environmentStateCallLines.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 23:08:25 -07:00
Edgar ArakelyanandClaude Opus 5.5 ae8efbb439 feat(environment): answer list filters, search, sorting and paging from the state
- A list view learns, from the lines its whole collection does not
  explain, what each query parameter does: a filter on a field, a
  case-insensitive search over fields, a sort, a direction, a page size,
  an offset, a page number, or nothing for the values recorded. A line
  is answered by evaluating them only when that reproduces what it
  recorded, and the view's `query` names those lines and the envelope
  members that count matches before paging.
- Serving evaluates the query over the live state for those lines and
  for calls whose every query argument has a role, so filtered and
  sorted lists show created, changed and deleted entities and new
  argument values; other calls replay as before.
- The write gate checks a read on such a line against the query over
  its copy of the state. Only a line that sorts or pages its whole
  collection covers the collection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 22:56:58 -07:00
Edgar ArakelyanandClaude Opus 5.5 847b0931a3 docs(specs): record per-line list membership over fifty captures and six applications
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 22:33:52 -07:00
Edgar ArakelyanandClaude Opus 5.5 40800631d2 fix(environment): count no write for a collection once a read shows its entity gone
A whole list's read checks the collection, so it exercised every write
that changed it since the last check. A create whose entity an
unmodelled delete removed, and a 404 then showed gone, was still among
them, so a whole list taken afterwards confirmed a create it cannot
show. The absent entity now leaves every write's claim on its
collection, as a modelled delete's replacement does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 22:30:27 -07:00
Edgar Arakelyan 8a374b6b56 Merge remote-tracking branch 'fork/feat/environment-state-writes' into feat/environment-list-lines
# Conflicts:
#	src/domain/analysisView/environmentStateWriteChecks.ts
2026-10-20 22:23:45 -07:00
Edgar ArakelyanandClaude Opus 5.5 dc5e2aadff fix(environment): weigh an update's derived changes when a later write replaces it, and reset collection spellings
- An update's effect is now every field it sent or changed, derived ones included. A later write replaces it only by overwriting all of them, and an increment adds to its field rather than overwriting it. A PATCH that renames and bumps a version stays confirmed after a PUT that renames but keeps the version.
- The entity-level and collection-level records of what each write changed are kept apart, each forgotten when its own target is checked.
- A reset or load starts from the collection spellings of the state it installs, as a fresh store does, rather than keeping those of the state it replaced.

The verdicts over the 50 captures are unchanged plan by plan, and the smoke applies all 31 served write tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 22:18:34 -07:00
Edgar ArakelyanandClaude Opus 5.5 1d1c478764 fix(environment): confirm a write only by reads that still see it, and keep started values and spellings
- A read whose body no longer holds the entity, or no longer holds the list, or shows an entity without its required fields, now contradicts the write it checks instead of passing it by default. Serving and the gate share one required-field test.
- A later write that replaces an earlier one's effect (a create or delete, or an update rewriting the same fields) drops the earlier write from the entity and, once it has no entity left there, from the collection. A list taken after a delete no longer confirms the create it removed.
- Generated sequences skip every value the loaded state started with, so a deleted entity's id is not handed out again.
- A create into an emptied collection keeps the collection's spelling.

The 50-capture census still serves 31 write tools: Linkding's bundle create and patch are now unconfirmed, because the only list that checked them was taken after the bundle was deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 21:31:26 -07:00
Edgar ArakelyanandClaude Opus 5.5 fc403d98d4 chore: merge environment state serve (6b8db198) into environment state writes
This branch already refuses a loaded state that data/get would write past the intake limit, with the size kept incrementally, so its store is kept; the serving branch's test and docs come along.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 21:10:13 -07:00
Edgar ArakelyanandClaude Opus 5.5 6b8db19891 fix(environment): refuse a loaded state that data/get would write past the intake limit
data/add measured only the document it was given, while data/get
writes the state back with the members a document may omit (types, the
state Evidence id, view fields and record citations). A document just
under 32 MiB could therefore load and be reported larger than any intake
accepts, breaking the data/get then data/add round trip. replace now
measures the state as data/get writes it, part by part, and refuses it
past the limit, leaving the state unchanged. The limit moves to the
state document module, so the application store can read it; the
intake re-exports it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 21:08:54 -07:00
Edgar ArakelyanandClaude Opus 5.5 111556a409 docs(specs): record per-line list membership measured on six environments
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 20:49:37 -07:00
Edgar ArakelyanandClaude Opus 5.5 9edbabe8eb chore: merge environment state coverage (665112e9) into environment state writes
The tool description string conflicted only because this branch adds its write-plan sentence beside the coverage text; both are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 20:49:06 -07:00
Edgar ArakelyanandClaude Opus 5.5 4aeefd9df0 chore: merge environment state serve (25b6622d) into environment state writes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 20:48:17 -07:00
Edgar ArakelyanandClaude Opus 5.5 665112e9ed fix(environment): quote the prefix of a member name too long to show whole
A response summary's envelope member longer than the description sample
was cut and printed raw, so a newline or separator in it could read as
more of the tool description. The shown prefix is now written as a JSON
string, as shorter names are, before the truncation note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 20:47:44 -07:00
Edgar ArakelyanandClaude Opus 5.5 87e94d12ea test(environment): cover per-line list membership; document it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 20:47:33 -07:00
Edgar ArakelyanandClaude Opus 5.5 19ef539425 chore: merge main (335c042d) into environment state coverage
The tool description string conflicted only where main added Frida session status and this branch describes document reads; both are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 20:43:04 -07:00
Edgar ArakelyanandClaude Opus 5.5 54d3d5e65a feat(environment): decide a list's whole-collection membership per line
- A list view was `all` only when every checked line listed its whole
  collection, so one filtered line kept every line to its recorded
  members and created entities never appeared. Each checked line that
  only pages and lists its whole collection in state order is now named
  in `all_record_ordinals` on a recorded-membership view, and answers,
  is checked and places creates as an `all` line does.
- `numberOfElements` and similar number-of-items members count the
  listed entities.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 20:42:16 -07:00
Edgar ArakelyanandClaude Opus 5.5 25b6622d3a chore: merge main (335c042d) into environment state serve
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 20:39:25 -07:00
gensokyo-dev 335c042d16 docs(testing): reference the configured duplication limit (#5758) 2026-10-21 11:26:43 +08:00
morluto d0067ba34a fix(native)!: preserve Swift pointer nullability and import bindings
Resolve relative pointers using field-owned ABI encodings. Keep null, raw, rebased, imported and unknown targets distinct, and retain imported conformance rows with exact Mach-O binding provenance. Decode legacy rebase membership with source-derived memory and work bounds, preserving validated prefix facts when streams are incomplete.

Validation: check:ci, docs:check and build passed; 158 source tests and 20 schema/acceptance tests passed. Ten source-built Apple dispatch variants and four issue-specific CLI/MCP workflows passed without executing targets. Paired cold/warm CLI/MCP cost observations retained locally; model tokens and maximum-sized input runtime were not measured.

Closes #5683
Closes #5685

BREAKING CHANGE: Swift conformance type_name and protocol_name can be null when names cannot be resolved; consumers must use typed type_binding and protocol_binding evidence. MachoImportBinding replaces the former Objective-C-specific binding type and schema.
2026-10-21 08:17:12 +08:00
morluto 9258df02cc test(apple): compare asset catalogs from matching root workflows
Compare explicit bundle-resource CLI and MCP results at the positive empty-inventory offset. Preserve a separate binary-bound MCP assertion with the exact fixture executable digest and complete metadata payload.

Validation: reproduced the stale root-versus-binary parity failure on current main, then passed the macOS public CLI/MCP acceptance case across all five NIB fixtures. Focused lint, formatting and diff checks passed. No target code was executed.
2026-10-21 07:37:36 +08:00
morluto 1502cfbc8c fix(apple): resolve absolute dylib paths inside the selected root
Preserve load-command paths as evidence while passing a separate root-relative lookup path to the bounded tree resolver. Apply the same containment rule to absolute install names and rpath bases, including caller-selected root symlink spellings.

Validation: 140 source tests, full check:ci, docs and runtime build passed. Compiler-built literal, rpath and relative fixtures passed CLI/stdio MCP parity, preserved both dependency edges and left all bytes unchanged. External system paths stayed outside-target; relative control was unchanged. Fixtures were not executed, and actual dyld execution was not qualified.

Closes #5637
2026-10-21 07:37:15 +08:00
Edgar ArakelyanandClaude Opus 5.5 f2b95351d4 fix(environment): answer a missing entity with a 2xx null only for reads
A served write of a missing entity also looked at the write tool's own
recordings, so a delete that recorded 200 null for a successful
deletion answered a missing target with success. A 2xx null is now an
absence only when the call is a read, as the gate takes it from item
reads; a write still answers with a recorded 400, 404 or 410, or is
refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 16:35:52 -07:00
morluto 84c89d1107 test(javascript): separate heap pressure from graph admission proof
Match memory failures to the exact source identity instead of graph ordering. Preserve CLI parse, file-evidence, partial-result, later-source and unchanged-input checks across valid memory-pressure outcomes. Use a controlled parent heap envelope with a real owned analyzer to prove module retention and graph rejection independently of host GC timing.

Validation: full check:ci passed; 17 focused tests passed, with the final 4 changed tests rerun successfully. Independent test-strength and isolation review passed. The earlier hosted failure exposed missing graph-only fields; its exact alternate memory stage was not captured.
2026-10-21 07:26:20 +08:00
morluto 0bd14ca16c fix(browser): preserve uncertain main-frame navigation identity
Own CDP frame applicability and identity at the parsed event boundary. Preserve malformed or incomplete main-frame facts, recognize replacement roots, and carry the same document identity through captures, screenshots, timelines, and execution windows.

Validation: full check:ci and docs:check; 763 browser and dispatch tests passed, 6 skipped. Independent source and fixture-lifecycle review passed. Local real-Chrome behavior was not exercised.

Closes #5665
2026-10-21 07:16:47 +08:00
Edgar ArakelyanandClaude Opus 5.5 b6c3b168f6 fix(environment): match document write paths, verbatim create collections and absences
Four places where the gate and serving still disagreed:
- the gate applied a document write to the held document whatever path
  it wrote, while serving refuses any other path; a write at another
  path is now unmodelled;
- a create took the first held collection its parent value matched,
  so with acme1 and %61cme1 both held a create for acme1 could land in
  the encoded one; the verbatim spelling now wins, as for item calls;
- the gate accepts a 2xx JSON null as a recorded absence, but serving
  answered a missing entity only with a recorded 400, 404 or 410; the
  null answer is now served too;
- data/add measured only the document it was given, so one that omits
  types and the state Evidence id could load under 32 MiB and grow past
  it as data/get writes it back; such a document is now refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 16:13:35 -07:00
morluto 9dee989a79 fix(native): count Objective-C coverage by class object
Count each admitted unique class or metaclass object at its parsing owner. Preserve emitted metadata, independent class-list scan bounds, partial failures, and truncation.

Closes #5706
2026-10-21 07:01:17 +08:00
morluto f789fd1fd8 fix(native): count Swift vtable coverage in slot units
Count examined and decoded vtable slots in the same population, preserving all returned slots and partial descriptor failures. Document the coverage unit and retain malformed-sibling and unresolved-slot checks.

Closes #5681
2026-10-21 06:56:18 +08:00
morluto ccc7da309d test(mcp): retain distinct Objective-C class observations
Require both fixture addresses and unknown identity coverage when no selected-image binding proof permits coalescing.
2026-10-21 06:45:34 +08:00
morluto 56679dd2ae fix(files): preserve physical read provenance through cleanup
Keep raw physical read diagnostics alongside explicit operation provenance on the same cleanup owner. Preserve provenance after successful close retry for opted-in readers, restore legacy error projections, and prevent borrowed cleanup-shaped failures from authorizing foreign resource retries.

Refs #5686
2026-10-21 06:45:34 +08:00
morluto 52c84f6f58 test(cli): bound ADB MCP validation to the advertised tool
Reuse the exact selected advertised descriptor for SDK output validation instead of compiling the entire cached catalog for every fresh parity-test client. Retain actual catalog discovery, schema validation, and all result assertions under the existing worker heap limit.
2026-10-21 06:23:20 +08:00
morluto 4852c830af fix(native): preserve Mach-O names equal to version
Parse only documented compound otool field labels so valid segment and section names are retained at the owning boundary. Verified real Apple clang fixtures through compiled CLI and stdio MCP without executing the targets.

Closes #5680
2026-10-21 06:19:43 +08:00
morluto 949966712e fix(files): preserve physical read failures across late cancellation
Tag physical read outcomes at the owning boundary and preserve opaque caller cancellation reasons through JSON pipelines and reference imports. Share named bounded-read options across consumers and retain failed cleanup ownership for retry.

Closes #5686
2026-10-21 06:14:03 +08:00
morluto 4d7de00d4c fix(native): coalesce Objective-C class imports by binding identity
Join provider class observations only when selected-image identity and exact import bindings establish equivalence. Preserve distinct observations and unsupported coverage.

Refs #5607
2026-10-21 06:12:21 +08:00
morluto b231c28cf6 fix(hopper): own Mach-O preparation through cleanup retry
Preserve exact selected-image identity and descriptor ownership across preparation, final cleanup, and retries. Keep physical failures and failed cleanup leases observable through provider and launcher boundaries.

Closes #5688
2026-10-21 06:12:09 +08:00
Edgar ArakelyanandClaude Opus 5.5 5327e59852 fix(environment): choose a read's checked line as replay chooses the call's
Keying checked lines by the raw path skipped a read serving still
answers: with the list recorded at /api/orgs/%61cme1/books, a later
/api/orgs/acme1/books read names the same line through replay's decoded
fallback, so it went unchecked while serving listed the encoded
collection, and a delete it contradicted stayed served.

The gate now ranks a view's checked lines for a read as replay ranks
them for its call: every parameter the read's value verbatim or once
percent-decoded and the same query, then the most verbatim parameters,
then recorded order. A list is compared from the collection of the line
it answers from, as serving lists it, in the check, the taint checks and
the insert retry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 14:51:36 -07:00
morluto 7dd6941393 refactor(test): share browser and apktool fixture lifecycles 2026-10-21 05:50:50 +08:00
morluto 1bb2fa23de test(apple): match plist provenance to the selected workflow 2026-10-21 05:50:50 +08:00
Edgar ArakelyanandClaude Opus 5.5 db8df45f4b fix(environment): keep checked lines' path spellings; check later slug rules by value
- Checked lines now keep the path as spelled and canonicalise only the
  query: replay prefers a verbatim path spelling, so two spellings of
  one parent (acme1 and %61cme1 under one templated tool) stay separate
  lines and each read is compared with its own line's envelope.
- A slug rule a later call shows is checked against the values earlier
  calls recorded (the slug of the source they sent against the slug
  they showed), not only their member names, so a call that resent an
  unchanged name no longer hides the tool; an increment still conflicts
  with an earlier call that showed an integer field unchanged.

The view fixture takes template rules so the gate can be tested over
templated parents.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 14:38:28 -07:00
morluto ab58edcdf5 fix(environment): retain tarball descriptor ownership during export
Use the shared positional reader for both tarball passes so early output refusal cannot close the descriptor ahead of its owner.

Closes #5684
2026-10-21 05:33:35 +08:00
morluto 60956c8c56 fix(ci): run cache retention from its trusted workflow revision 2026-10-21 05:28:08 +08:00
morluto 5518363aa6 test(artifacts): compare matching resource-root workflows 2026-10-21 05:28:03 +08:00
morluto 4108d1363a test(cli): align Kuna readiness and cancellation expectations 2026-10-21 05:27:56 +08:00
Edgar ArakelyanandClaude Opus 5.5 7056f5ff13 docs(environment): record the second review round's verification
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 14:12:35 -07:00
Edgar ArakelyanandClaude Opus 5.5 2086da6cc7 fix(environment): make the write gate and serving agree on lines, rules, inserts and documents
Five places where the gate approved a write serving would answer
differently:
- list and document reads are matched to checked lines as serving
  matches calls (path and query values decoded, the query in any
  order), so a reordered query no longer hides a contradiction;
- an increment or slug applies to every call, so a plan is
  unexplained-change when one call changes such a field and another
  leaves it as it was, in either order;
- an item read confirming a create no longer stops a later list from
  choosing another insert candidate; only a list check fixes the rule;
- the gate runs serving's document body check (accepted members, JSON
  types from the held and initial document), so a recorded write that
  serving would refuse leaves the plan unserved;
- a served create decodes its path values from the collection the call
  names, as the gate decoded the recorded path, whichever spelling the
  call used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 14:12:34 -07:00
morluto 0bc2b42001 fix(browser)!: preserve unknown WebSocket frame facts
Keep malformed or missing CDP opcodes and payload facts unknown, retain observed zero and empty payloads, and avoid false capture differences while preserving independently known facts.

Validation: 59 source tests; compiled public CLI and stdio MCP fake-CDP acceptance; check:fast; docs:check; changed-file formatting. Real Chromium malformed-event behavior was not tested.

BREAKING CHANGE: WebSocket event opcode is nullable and numeric values are restricted to the four-bit protocol range.

Fixes #5666
2026-10-21 05:00:37 +08:00
c38f96fa69 test(cli): keep IPC trace input under the Linux spawn limit (#5673)
* test(cli): keep IPC trace input under the Linux spawn limit

The listener-callsite CLI builds one trace argument from the full
application Evidence document. On 4 KiB-page Linux that string exceeds
MAX_ARG_STRLEN, so spawn throws E2BIG before the command starts. Keep the
document in a file, require the spawned argv to fit the single-argument
budget, and lock that budget through the test process registry.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* test(process): size the spawn ceiling from ARG_MAX and MAX_ARG_STRLEN

A payload at the single-string limit still fails execve with E2BIG when
the stack shrinks ARG_MAX below the rest of the image. Accept only the
bytes that fit both budgets, and skip that success spawn when the fixed
argv and environment already fill ARG_MAX.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* style(test): format files rejected by oxfmt in static checks

check:ci:fast failed format:check on the CLI fixture import and, after
merging main, on the admission test's new command-abort case.

Co-authored-by: morluto <morluto@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
2026-10-21 04:48:33 +08:00
Ulises Millán c4b6aa3061 fix(managed): treat extension-only module scopes as unknown identity (#5674)
Closes #5467
2026-10-21 04:35:45 +08:00
Edgar ArakelyanandClaude Opus 5.5 df2bded16e test(environment): pin the replay card with quoted summary names; record the review round
The coverage branch writes captured field names in response summaries as
JSON strings, which changes the replay card's tool descriptions. The pin
moves to the 12,818-byte card; removing the quotes reproduces the old
12,618-byte digest exactly, so nothing else in the card changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 13:25:04 -07:00
morluto dceefa22cb Merge remote-tracking branch 'origin/main' into codex/audit-continuation-20261020-refresh20 2026-10-21 04:22:27 +08:00
morluto 6a6adf703f fix(resources)!: inspect app resources without an executable
Add a read-only app resource session shared by CLI and MCP. Preserve resource-root provenance without inventing executable identity, reject binary-only snapshots and operations, and retain failed cleanup owners across switches and retries.

Keep filesystem admission failures typed and preserve cancellation ordering from observed cleanup facts. Document resource routing in the packaged investigation skill.

BREAKING CHANGE: resource-only observations may have a null Evidence subject and null executable target digests. Clients must use resource_root and reported per-resource provenance instead.

Refs #5589
2026-10-21 04:22:20 +08:00