07eb044f77444de131d6c1bcdec082e5a5fcd221
260
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
0354759370 |
fix(artifacts): retain admitted ZIP ownership through extraction
Transfer the inventoried ZIP descriptor after inventory reader cleanup, then borrow it for materialization instead of reopening the pathname. Release the exact owner before publishing output; preserve failed owners for cleanup retry and completed inventory facts through cancellation or later tagged failures. This uses the existing admitted-descriptor reader API without a third carrier hash pass. Remove the superseded materialization wrapper. Cover identical-member carrier replacement, directory/missing replacements, late cancellation at both handoff and final close, mixed cleanup outcomes and retry. Root-owner test seams preserve real output-handle cleanup. Compiled CLI/MCP ZIP, archive and report regressions also run; no benchmark is claimed. |
||
|
|
1184819cb9 | fix(verifiers): load shared source without compiler processes (#7012) | ||
|
|
02e049744f |
feat(environment): build agent environments from a prompt (#6946)
* feat(environment): report what an environment serves with an environment-coverage view A new inspect_analysis_view kind over capture Evidence. It projects the state an environment derives with the given template rules and reports each tool as answered from state, replayed with its view reason, a served write, or a withheld write with its reason, the records behind it and a hint about what to record next. The hints cover every write reason, so a new reason without one fails to compile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(environment): build an environment bundle in one command rea environment-build <capture> [directory] inspects a HAR (or reads capture Evidence), projects the environment manifest from the in-memory Evidence, authenticates the pair, prepares the state and writes the bundle environment-export writes. Every bundle file is byte-identical to the three-step path for the same capture and options. The report adds the capture and manifest identities, the coverage summary, warnings (a loopback capture named after its file, credential-named body members by pointer) and the next command. --dry-run writes nothing. The default template rules are the four the published environments use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(environment): cover environment-build and the coverage view Domain tests check the hint table against the state view's reasons, the summary, and the view against the environment-state view it summarizes. Service tests build the fixture capture and compare every file with the three-step path, a dry run, loopback naming and the refusals. A CLI test compares a HAR built in one step with the three CLI steps byte for byte, and an MCP test projects the view from every source kind. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(environment): build the real-agentenv lane's bundle with environment-build The lane now runs the command users run: it builds the Grafana-shaped HAR with environment-build and the packed checkout, checks the report, then runs the bundle with agent-env as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(environment): document environment-build and the coverage view The agent environments guide opens with the one-step build: the report, the hint for each withheld write reason, and what a bundle ships. The CLI guide, the capture guide and the skill reference name the command and the environment-coverage view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): harden environment-build after review - The credential scan walks with its own stack, so a deeply nested body cannot crash the build, and it also reports credential-named header names, query names, form body members and string arrays. - The build checks SIGINT between stages: cancelled before the bundle stage it writes nothing, during the write it names the written bundle. - A dry run opens the package tarball, so it refuses what a build refuses. - Repeated template rules are refused, a HAR saved as .json gets a hint, file-derived names follow the bundle name rules, `localhost.` counts as a loopback origin, and the next command is shell-quoted. - --capture-timeout-ms passes through to the HAR inspection, and a missing directory is refused before inspection. - The no-observation hint covers updates and deletes of entities the state never held; the coverage view states that it does not apply the serve-time admission checks; the inspect_analysis_view description names the view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(environment): state the build's conditions and record its verification The guides now state when the one-step bundle equals the three-step one, which headers inspection excludes, what the credential warning scans, how cancellation behaves, and that the coverage view does not apply the serve-time admission checks. The spec folder records the census, the end to end runs, the gates and the review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): dispatch a pending interrupt before each build stage check The manifest, state and coverage stages run synchronously, so a SIGINT that arrived during them was only dispatched once the bundle write had begun. Each check now yields first, so an interrupt before the bundle stage cancels the build with nothing written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(browser): send declared requests from a scenario page with a request step A capture_browser_scenario step `request` sends one declared HTTP request through the page's own fetch, with its cookies and session, the way the application's frontend would, and reads the whole response so the capture records the transaction like any other. The path must resolve to the start URL's origin, and the page must be on that origin when the step runs. Query values and header values may be literals or declared secrets, and a header may read its value from a cookie or a local storage entry, which is then redacted from later records like a declared secret. `expected_status` fails the step on any other status. Scenarios without a request step are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(browser): verify request steps in a real browser through to a built environment verify:browser:request records a write session against a fixture item API that refuses writes without its CSRF cookie header and stored bearer token. It checks that every request lands in its own step, that the page values authenticated each write and appear in no record, header or body, that an unexpected status fails the step and cancels the rest, and that environment-build serves the recorded create, update and delete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(environment): export environment bundles over MCP export_environment_bundle writes the bundle environment-build writes, from capture Evidence retained in the session or one capture Evidence file, into an absolute output directory that must not exist and whose parent must exist, as extract_firmware and export_web_scripts require; it never creates the parent or reuses a directory. It returns the same report, whose schema now lives in the domain so the CLI and the tool share it, and dry_run reports without writing. A loopback capture without a file needs a name. The build's refusal messages no longer name CLI flags. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): scan scenario credentials, own the dry-run tarball and serialize Evidence once A browser scenario's retained header values and the query parameters of its recorded URLs are scanned for credential names as a HAR's are, through a review projection of its records. A dry run admits and releases the package tarball through the export's regular-file scope, so a close it cannot confirm keeps its owner, and checks for cancellation after that last await. Evidence is written into one exactly sized buffer instead of chunks joined by a copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(environment): record the review round's checks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(skill): build agent environments from a prompt with request steps and the bundle tool Add the environments reference to the skill and install it with setup: record against a disposable instance, sign in through the UI, write with request steps and read each write back, check coverage, re-record by withheld reason and export the bundle. Route it from SKILL.md, name agent environments in the skill description, and document the request step, the export tool and recording writes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(browser): split the request lane and header resolution into smaller functions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * style(environment): format the build spec Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): say when an untimed capture learns no write clock Coverage of a capture whose records are not all timed, which includes every browser scenario capture, now states that the state learns no clock, so an update stamped with a server-set modification time stays unexplained-change however often it is recorded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(skill): give agents a whole scenario shape with step timeouts Agents guessed the scenario schema field by field and two hung on steps without timeout_ms. The reference now starts from a complete scenario with a timeout on every step, and says a scenario capture cannot serve updates the application stamps with a modification time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(browser): keep request steps on their origin and their page values redacted - Follow no redirects: a redirect fails the step and nothing reaches the location it names (checked in real Chrome), and check the page's origin again in the page as the request is sent. - Send nothing once the step's time has run out or it was cancelled while header values were read; the in-page deadline is what remains of the step's. - Keep every page value redacted under a repeated or colliding label, keep a value's first marker when it is read again, and leave values shorter than 8 characters unredacted rather than rewriting ids, ports and hosts. - Refuse a header name given twice, User-Agent (Chrome drops it) and line breaks in literal values and prefixes; fail before sending when a secret or page value holds them. - Append query entries after the path's literal query without re-encoding it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(environment): document request step limits and word bundle refusals for both surfaces Document redirects, timeouts, page value redaction, HttpOnly cookie sources and header refusals for request steps. Refusals shared by environment-build and export_environment_bundle no longer name CLI flags, and the retained loopback refusal no longer prints an empty file name. The skill reference asks for read-backs after each write, shows the coverage view's source, names package_tarball for unreleased builds and the browser path a scenario ships. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): scan every form occurrence and MIME-less scenario bodies The build's credential scan collapsed form bodies with Object.fromEntries, so a repeated field kept only its last occurrence: `api_key=secret&api_key=` warned about nothing although the Evidence ships the value, and repeated values were undercounted. Form fields are now scanned as ordered name/value pairs, as headers and query strings already are. The review projection of a capture_browser_scenario dropped a request body recorded without a media type, so the scan never saw it. Review keeps such a body's text with an empty media type; the manifest projection still reads only bodies it can classify. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(browser): close request step edge cases from the second review - Append query entries correctly after a path ending in "?", "&" or "#". - Refuse 3xx expected statuses, which an unfollowed redirect can never report, and say a redirected write may already have been applied. - Redact a page value also as fetch sends it, without surrounding spaces and tabs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(environment): document page value body costs, redirects and MCP dry runs Document that reading a page value shrinks the bodies a capture keeps under the default allocation limit, that redirected writes may have landed, that the MCP dry_run still checks its output directory and which refusals name the tool, and keep the .har hint in the HAR-as-JSON refusal for both surfaces. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(environment): record the prompt-to-environment verification Gates, the real-browser lanes, five environments built from prompts by an agent on disposable VMs and evaluated with two models, and the two reviews. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(skill): count rollback failures from the managed skill files The environments reference made the skill eight files, so the recovery tests now derive the counts they expect from MANAGED_SKILL_FILES instead of fixing them at six and seven. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(adb): restore the portable Java float pattern a merge rewrote A lint autofix during a merge unescaped the hyphens in javaFloatValuePattern, which is invalid in a v-mode character class, so the advertised start_adb_activity schema failed to compile in every JS regex mode. The file now matches main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(browser): show the request step inside a whole scenario Every JSON example in the browser scenario guide is a capture_browser_scenario input the catalog test parses, so the request step example now sits in a launch scenario instead of standing alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): scan structured HAR form params and the request side of unattributed scenario transactions A HAR request recorded with postData.params and no text is scanned by those parameters, each occurrence counting, and the review projection keeps the request side of a scenario transaction whose response cannot be attributed, so the credential warning covers what evidence.json ships in both cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): validate build paths and read dry-run tarballs * fix(environment): report bodies too large for the credential scan Text bodies over the scan's 4 MiB limit, including a response decoded only as a prefix, are reported as a credential-scan-incomplete warning by record and side, never by content, so an absent credential-named-members warning no longer reads as a complete check. The spec and agent-environments guide also state the path validation and dry-run tarball read that e52ae1cd added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(verification): release cold source transform services * fix(javascript): retain capture context along covered mutation paths * fix(environment): guard request dispatch and report export limits * fix(environment): admit serialized exports and scan HAR form fallbacks * fix(environment): admit in-memory build inputs against heap headroom and scan SaveHar null-text forms The inspected HAR's Evidence and the projected manifest are checked against live heap headroom before they are serialized, with the same check the file route uses, so a capture too large to parse and seal is refused as resource_constraint before anything is written. A request whose postData text is SaveHar's null is scanned by its structured params. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): measure the credential scan limit in UTF-8 bytes A body counts against the 4 MiB limit by its UTF-8 length, not its UTF-16 code units, so multibyte text over the limit is reported as unscanned instead of parsed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(browser): send request steps only before their deadline and keep page reads on the start origin The page receives the step's absolute deadline and a one-second start window, so a busy page that runs the request late, or after the step is cancelled, sends nothing; local storage is read only on the start origin; the response is drained without keeping its body; an unparseable path is a field issue; retained Evidence is refused for heap headroom before it is serialized; and the skill says how to reach server-assigned ids. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * style: format integrated export admission * fix(javascript): erase inline type imports before binding values * fix(browser): run the request lane under the shared verifier command owner The browser request lane runs each CLI call through createPackageVerifierCommands on a private runtime root, so a timeout, output overflow or failure stops the CLI and the browser it launched before the root is removed, and a failed stop is reported with the root retained. The verification record states the lane's current counts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): scan scenario content by event and read bodies by their media type A browser scenario's credential scan reads every retained network-content event, including a response attached mid-flight and a transaction no record represents, with event pointers, and each transaction URL's query once; the review record projection it replaces is removed. A body is parsed as a form or as JSON by its recorded media type, falling back to its shape, so valid forms such as `password=x&` are scanned and sentences are not read as forms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |
||
|
|
cab78de506 |
feat(ghidra): analyze GameCube/Wii DOL executables through Ghidra (#6240)
* feat(domain): parse and validate GameCube/Wii DOL headers Add a pure parser for the 0x100-byte DOL header (7 text and 11 data slots, BSS, entry point). Used slots must lie after the header and inside the file and the 0x80000000..0x81800000 load window; text slots are 4-byte aligned; sections may not overlap in memory or in the file; the entry point must be inside a text section. BSS may overlap data sections, as .sdata/.sdata2 do in shipped DOLs. Refs #1741 * feat(binary): admit caller-selected GameCube/Wii DOL targets * feat(ghidra): import GameCube/Wii DOL targets through a section-map pre-script * test(ghidra): cover DOL launcher arguments, attestation and raw profile digests * test(ghidra): add the real verify:ghidra:dol lane and DOL docs * fix(ghidra): read only the DOL header and section ranges instead of the whole file * test(ghidra): derive DOL lane addresses from readelf and admit Gekko from the install catalog * fix(ghidra): attest DOL block permissions, space, overlay and load state * fix(ghidra): keep load-image permissions optional for older inspections * fix(contracts): accept DOL targets in binary_session output * fix(ghidra): adapt the DOL lane to the current upstream address schema Validate DOL load-image coordinates with the upstream observed-address schema, drop a duplicate import left by the rebase, and re-pin the raw profile digests to the unmodified upstream resolver. * fix(ghidra): preserve bridge inventory symbol provenance * fix(ghidra): align DOL verification with shared workflow contracts * feat(domain): parse and validate GameCube/Wii DOL headers Add a pure parser for the 0x100-byte DOL header (7 text and 11 data slots, BSS, entry point). Used slots must lie after the header and inside the file and the 0x80000000..0x81800000 load window; text slots are 4-byte aligned; sections may not overlap in memory or in the file; the entry point must be inside a text section. BSS may overlap data sections, as .sdata/.sdata2 do in shipped DOLs. Refs #1741 * feat(binary): admit caller-selected GameCube/Wii DOL targets * feat(ghidra): import GameCube/Wii DOL targets through a section-map pre-script * test(ghidra): cover DOL launcher arguments, attestation and raw profile digests * test(ghidra): add the real verify:ghidra:dol lane and DOL docs * fix(ghidra): read only the DOL header and section ranges instead of the whole file * test(ghidra): derive DOL lane addresses from readelf and admit Gekko from the install catalog * fix(ghidra): attest DOL block permissions, space, overlay and load state * fix(ghidra): keep load-image permissions optional for older inspections * fix(contracts): accept DOL targets in binary_session output * fix(ghidra): adapt the DOL lane to the current upstream address schema Validate DOL load-image coordinates with the upstream observed-address schema, drop a duplicate import left by the rebase, and re-pin the raw profile digests to the unmodified upstream resolver. * docs(ghidra): qualify the DOL memory window * refactor(ghidra): own DOL BSS ranges in the parsed header * docs(ghidra): record real DOL workflows and task costs * docs(ghidra): record final DOL integration verification * fix(mcp): share the native procedure search row contract * docs(ghidra): record public procedure search verification --------- Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
43c7255dbd | fix(android): preserve binary class selectors across metadata calls | ||
|
|
fbe77dc479 |
refactor(verification): separate readiness evidence scopes
Move the synthetic evaluator and its unchanged semantic tests out of the shipped runtime. Retain actual CLI and MCP Evidence separately from the synthetic nine-stage baseline in a versioned verifier artifact, execute its reported conformance checks, and assign the verifier to its CI lane. Validation: evaluator/state/classifier source suites, compiled CLI/MCP views, verify:readiness, static checks, build and docs passed. Readiness observed coverage is static analysis; fixture runtime behavior and reconstruction closure were not executed. |
||
|
|
41e10b240c | fix(filesystem): distinguish admission and bound-target failures | ||
|
|
d662fa54a6 | fix(test): reserve heap headroom for shared CLI workers (#6941) | ||
|
|
2bd981b017 | refactor(tests): consolidate compiled CLI session ownership | ||
|
|
eea3271a33 | test(cli): load only Frida contracts for focused CLI checks | ||
|
|
eac392d085 |
revert(test): remove unproven SDK compiler sharing
This reverts commit 56eca648d. The equivalent completed two-client measurement increased elapsed and CPU time, so compiler sharing has not established a benefit. |
||
|
|
5909430771 | perf(test): share SDK catalog compilation across deferred clients | ||
|
|
cb689fae96 | test(package): join owned updater after registry fixture failure | ||
|
|
d0375a1ed0 | test(filesystem): probe actual permission denial before host assertions | ||
|
|
0c4bf68ce8 | merge: reconcile concurrent main fixes with issue remediation | ||
|
|
0d849b1ae8 | docs: separate retained notices from provider version support | ||
|
|
91f06f55a3 | ci(docs): render documentation in the selected docs lane | ||
|
|
5d2c8c2b78 |
feat(cli)!: export row-oriented results as JSON Lines (#5629)
* feat(cli): add JSON Lines output for row-oriented results (#5487) - Support opt-in JSON Lines format (--format jsonl) for row-oriented results and collection views with clear record boundaries - Preserve stable source identities and stream records deterministically line-by-line - Emit final coverage and limitation metadata as a distinct line with https://rea.dev/schemas/jsonl-coverage-v1.json to prevent confusion with data rows - Distinguish error outputs with https://rea.dev/schemas/jsonl-error-v1.json - Reject non-row-oriented results that lack record boundaries with an unreadable_output error - Document JSON Lines streaming conventions in docs/cli.md - Add boundary tests covering empty results, multiline strings, partial coverage, large fields, and non-row rejection * fix(cli): preserve diagnostics, provenance, and nested collections in JSONL * fix(cli): frame classified failures and reject unrepresented JSONL facets --------- Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
1de720e02e | docs: stop and profile unexpectedly costly test runs | ||
|
|
2443b949a4 | docs: clarify evidence applicability and boundary limitations | ||
|
|
a281455f0b | docs: clarify parser authority and compatibility evidence | ||
|
|
e6537df806 | docs: clarify derived values and comparison controls | ||
|
|
461541348e | docs: clarify evidence ownership and verification guidance | ||
|
|
0d596fa8f7 |
docs(limits): describe how to design admission recovery (#6368)
* fix(reconstruction): dedupe residual unknown ids with uniqueSorted Merged obligation candidates called uniqueBy, which is not defined, so the project did not typecheck. String ids already use uniqueSorted. Co-authored-by: morluto <morluto@users.noreply.github.com> * docs(limits): describe how to design admission recovery Add a short contributor guide for named defaults, settings, recovery text, and the agent recovery ladder, and mirror that ladder into the authored skill. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(hopper): pass distribution readers into install-host tests systemLinuxHopperInstallHost now requires the caller's distribution reader. The Linux install tests still passed only the environment, so typecheck failed. Co-authored-by: morluto <morluto@users.noreply.github.com> * docs(limits): name the parser doctor shares with startup Co-authored-by: morluto <morluto@users.noreply.github.com> * test: align pcap, storage, and regex fixtures with current contracts Source and portable CI failed on fixtures that still described the previous pcap client identity, legacy storage fingerprints, and the old regex deadline sentence. Co-authored-by: morluto <morluto@users.noreply.github.com> * docs: link repository experiments outside the built site --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: morluto <morluto@users.noreply.github.com> |
||
|
|
9c81191b1d |
fix(ghidra): treat format-specific disabled analyzers as not applicable (#5425)
* fix(ghidra): treat format-specific disabled analyzers as not applicable * test(json): assert composed cancellation cleanup for staged output --------- Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
09416de0cd |
docs(testing): note Windows source-checkout suite expectations (#6323)
Document that the general source suite runs on Linux in CI and that Windows CI selects a curated lane, so Windows contributors compare failures against the base revision instead of attributing POSIX-only failures to their change. Fixes #6308 |
||
|
|
fd5cd1b058 |
test(acceptance): run loader ownership once through stdio MCP (#6354)
Keep every competing-loader source on the shared stdio session and compare three renderer outcomes with the compiled CLI. Retire the Early, Middle, and Late shards, and seed their historical duration onto the consolidated file. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: morluto <morluto@users.noreply.github.com> |
||
|
|
21f9af9d93 |
fix(ci): isolate packed Python syntax checks from ambient imports (#6293)
fix(ci): isolate packed Python syntax checks from ambient imports Keep caller-local modules and site startup hooks from replacing the standard-library AST/tar readers or executing during package validation. Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage) Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing) |
||
|
|
2452efa921 |
fix(ci): make Windows PowerShell observers cheap and cold-start tolerant (#6279)
The private-runtime ACL observer spent most of its time in PowerShell machinery: Get-Acl module autoload, an Update-TypeData guard that updates the session type table, and a Where-Object/ConvertTo-Json pipeline. On starved hosted runners this pushed it past the 15s deadline, and one run never reached the first script statement within 15s. Read the descriptor through DirectorySecurity with SID-typed GetOwner and GetAccessRules, check every compared identity is a SecurityIdentifier, keep Get-Acl/Access/NTAccount/Translate out of the observer with a static check, and build the JSON by string. Route the snapshot digest, readonly-children and sharing-reader observers through the same cmdlet-free helper. Record process uptime at script start, and give observers a 60s deadline that bounds a hung child while covering cold powershell.exe start. Asserted facts are unchanged. Fixes #6275 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
ef5ab1f1f2 |
fix(apple): decode NIBArchive booleans with AppKit's polarity (#6255)
The NIBArchive value decoder read type tag 4 as true and 5 as false, the reverse of what ibtool writes and AppKit's decoder returns, so every compiled-nib boolean in decode-interface-builder output was inverted. The test fixture encoder shared the reversed mapping, hiding it in round trips. Name the value-type tags once and use them in both the read and skip paths, fix the fixture encoder, pin raw tags in a unit test, and make verify:interface-builder compare both polarities with ibtool --export. Fixes #5541 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
538017d1d2 |
feat(environment): apply evidence-gated write effects to the served state (#5600)
* feat(environment): render more read tools from the state and describe responses Keep main's environment serving and fold in coverage for non-entity reads, response summaries, and MCP tool annotations. Squashed rebase of #5352 onto main. * fix(environment): keep rendered documents and quoted samples inside their budgets A recorded body of exponential numbers can render past 256 KiB and turn a working read into a state size error, so that document stays a recorded replay. Description samples are measured after JSON quoting, and the replay-fallback catalog check uses a tool count the longer response descriptions still separate. Co-authored-by: morluto <morluto@users.noreply.github.com> * feat(environment): apply evidence-gated write effects to the served state Serve write tools whose later reads confirm the effect, and keep main's state-file ownership and part-wise reply measurement. Squashed rebase of #5600 onto the rebased #5352 tip. * fix(environment): bound and validate write state history * feat(environment): render more read tools from the state and describe responses Keep main's environment serving and fold in coverage for non-entity reads, response summaries, and MCP tool annotations. Squashed rebase of #5352 onto main. * fix(environment): keep rendered documents and quoted samples inside their budgets A recorded body of exponential numbers can render past 256 KiB and turn a working read into a state size error, so that document stays a recorded replay. Description samples are measured after JSON quoting, and the replay-fallback catalog check uses a tool count the longer response descriptions still separate. Co-authored-by: morluto <morluto@users.noreply.github.com> * feat(environment): apply evidence-gated write effects to the served state Serve write tools whose later reads confirm the effect, and keep main's state-file ownership and part-wise reply measurement. Squashed rebase of #5600 onto the rebased #5352 tip. * fix(environment): bound and validate write state history * fix(environment): bound additional collection history * fix(environment): credit sent fields, negative sequences, and encoded targets A later overwrite copied surviving derived fields into the sent-member claim, so a members-only check rejected an update whose sent field still matched. Serving floored sequences at zero and stored missing history as zero, so a collection sequence learned from negative ranks skipped the next value. An absence after a delete forgot the resolved collection, and an encoded read could not observe an update spelled with another collection encoding. Regression tests cover each case. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(environment): cover resolved encoded update identities * fix: validate timed update observations * fix(environment): share write overlap and check clocks on earlier calls Observation search skips a read begun before the write ended. That comparison now uses the same overlap as the check path. A clock learned on a later call was not checked against earlier calls that kept the field. Serving would stamp those calls too, so the plan stays unserved. A clock learned earlier is still refused when a later call does not advance it. Regression tests cover an overlapping empty update and a published_at clock that one recorded call leaves unchanged. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix: preserve partial update evidence * fix(environment): let an unmodelled write explain only the list members that differ A failed whole-list read now reports which members alone account for the difference. An unmodelled write excuses the read's writes only when it came after each such member's last check and pending writes, so an older change elsewhere no longer hides a newer write the list shows undone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 7b6aab9d7191e600051693f2c192afcfc743d083) * fix(environment): explain added fields, tie creates to serving's collection, and bound write descriptions An update explains a field the entity lacked before when the observing view had shown the entity, so a server-filled field is not dropped. A create is tied to the held collection serving picks for its path. Write descriptions and body refusals quote member names and sample them within a byte bound. The request body is indexed once per explanation, so copied and slugged fields no longer rescan it. Replays 07aca54e onto the restacked branch. Its rule that a read begun before a write ended teaches nothing is already here (fb6785dc), so only its test is kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(environment): state how list reads weigh unmodelled writes, added update fields and quoted members Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(environment): keep the observing view helpers with the observations shownBefore and the item-or-list fields check move to the observe module, keeping the write effects within the line limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): resolve unmodelled writes onto the held collection An unmodelled path kept the request's collection spelling. An archive under the plain spelling of a collection held encoded marked only that plain collection unknown, so a later update was blamed for the archive's fields and dropped. Name that entity the way a modelled write does. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(environment): confirm no write through volatile fields or overwritten replacements, and bound the served clock A members-only check no longer compares volatile fields, which render from the read itself. A document replacement credits the members it wrote or removed at its object, so a later merge that overwrites them takes its confirmation away. A recorded time past the range of a date gives no served clock instead of throwing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): leave unknown entities unchecked by failed reads, volatile fields and unchecked calls A failed item read that is no absence leaves an unknown entity unknown, so a later usable read still checks its writes. A read showing an unknown entity again checks no write on a volatile field. An update of an unknown entity takes its recorded outcome and adds nothing to a built plan. A later update that does not answer with its entity is observed only by a read whose view shows every learned clock; without one it is unmodelled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): fill a create's path fields from the collection serving selects The gate built a later create's path fields from the recorded request path, while serving fills them from the held collection it selects for that path, so a read showing the other spelling's parent could confirm a create serving cannot reproduce. Rules still learn from the recorded path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): name unmodelled writes as modelled ones, count fields updates write, and keep later members' types An unmodelled write below an item path names its entity through itemTarget, and one at or above a collection resolves the held collection, as modelled writes do, so an encoded spelling no longer hides the entity it changed. An update's answer counts the fields its rules write, other than increments, as available, so a field only the update writes no longer makes it incomplete-entities. A member a later call first stores keeps that call's JSON type in the body's kinds, which the body check falls back to. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): let a document replacement overwrite everything under its object A replacement claims only the members it wrote or removed, but it now overwrites every earlier effect under its object, so a merge that wrote the object it replaces loses its confirmation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): start the served clock from the records whose times a date can hold A record timed past the range of a date no longer leaves the served clock without a start, which the store read as zero and stamped writes in 1970; the clock starts after the latest record a date can hold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: morluto <morluto@users.noreply.github.com> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
0b7213c890 |
perf(mcp): defer analysis runtime after catalog discovery (#4424)
Serve build-recorded default compact and explicit full catalogs, then materialize canonical analysis handlers on first use. Keep transport, Evidence delivery, profile identity and caller choices consistent. Share sealed MCP server ownership between eager and deferred lifecycle paths. Validate 125 focused cases, schema/contract repeats, negative controls, builds/static/docs checks and latest-main integration. Record 72 real SDK task trials with independent Rust metadata oracles and whole-family resource bounds; disclose shifted first-RPC cost and unchanged catalog tokens. Qualify the real Rizin small-target debug lifecycle separately. Automated review findings addressed; Codex review unavailable due repository usage limits. |
||
|
|
166fb0820f |
feat(environment)!: serve the environment state by default (#5351)
* feat(environment): extract the initial state a capture's reads observed Add the environment-state analysis view. From the parents the environment manifest accepts, it extracts the data the capture's reads observed before the first related write: entity types with an identity field (proved by a path parameter or inferred from an identity name), entities with their recorded values and provenance, documents for written non-entity paths, and a render plan per read tool that is kept only when it reproduces the tool's latest initial recordings from the state; every other read tool is a recorded view with the reason. The Evidence is always inferred. Response-body decoding moves to a domain owner shared with replay, exact JSON parsing moves to the owner of the exact-number policy, the manifest and state views share parent admission and record grouping, and projectAnalysisView takes its accumulators as one object. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): bound state at redacted writes; infer identity only from items A scenario write whose URL was redacted has no request line, so it was dropped and reads after it counted as initial state. Such a successful write now joins the timeline with an empty path, whose root relates to every type, so it ends every type's state; a limitation counts them. A list whose recordings were all empty passed the "every listed item carries it" check vacuously and published an identity field nothing showed; it now needs at least one item, else the view stays recorded as no-identity. A value that differed between two request lines of one item tool, such as a query variant, was called volatile, and the gate then substituted each recording's own value; only repeats of one request line now show volatility, so differing lines go through fields-differ. List membership is compared only while a list can still be the whole collection, and merged entities are indexed by type and collection once, so paged captures no longer cost pages times entities (8,000 pages of 40,000 entities: 5.7 s to 0.23 s). Docs and the tool contract say scenario state keeps the capture's redaction markers and how redacted writes bound it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): keep first sightings, one list pointer and linear field unions Entities took the order of the first plan observed, and item plans run before list plans, so a complete list read before its detail reads came out reordered and lost "all" membership; each entity now keeps its earliest recorded sighting. A list plan reused the first recording's pointer for later recordings, so a later response that was itself an entity wrapping a list was read as that list; every recording must now locate the same list. The field union scanned its ordered list for every key, quadratic in an object's width; a set now answers membership. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): keep post-write values and partial lists out of the initial state A value that changed between repeats of one request line was named volatile whenever no write under the type's own root lay between, so a write under another root (for example POST /api/dashboards/db before a second GET /api/search) left its effect in the initial state. Any recorded write between the two observations now leaves every tool of the type recorded with reason fields-differ instead. A list was published with membership "all" even when a total or count envelope member exceeded the number it listed. Such a counter now makes the membership "recorded". Also drop a stale doc comment on ObservedEntity.order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(environment): scope item-shaped and deleted written paths out of documents State documents are held only for list-shaped paths a POST, PUT or PATCH tool writes. Reads of item-shaped written paths and of paths that are only deleted stay recorded views; the guide now says so and the spec defers them to a later increment of #4933. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): count writes in flight when a value changes between reads The volatility check compared write start positions with the two reads, so a write already in flight when the earlier read started was missed and its effect was named volatile. A write now counts when its interval overlaps the span from the earlier read's start to the later read's end. The check also ran once per changed field and scanned every write. It now runs once per pair of observations, answered by a binary search over the writes in timeline order and the latest end among each prefix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): catch cross-tool changes across writes; read only item totals A value that changed across a write was caught only between repeats of one tool's request line, so a list read before a write and an item read after it put the post-write value into the initial state. Changes are now classified per entity in timeline order after observation: across any recorded write, a change between repeats of a line or between two lines of the type rewrites the type (every tool recorded as fields-differ); with no write between, a repeat's change is volatile. The classification lives in environmentStateMerge.ts. Any numeric member whose name contained "total" or "count" counted as an item total, so total_pages, account_id or page_count made complete lists partial. Item totals are now members whose name tokens include total or count and none of page, pages or per; a string of digits counts as a number; and a set has_more, next or next-page token member also marks the list partial. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): keep post-write observations out of initial state * fix(environment): retain field provenance and bound state inference work * feat(environment): serve tool calls from the environment state `environment-serve --state <state.json>` serves an environment from the initial state an environment-state view extracted. Read tools whose views are state-backed answer from a live state store: item views render the held entity into the recorded envelope, list views render the collection or the recorded members, and document views return the held value; a missing entity or one lacking a required field is refused, and requests the state cannot answer fall back to their recordings with the reason. The /agentenv data plane implements data/reset, data/add (a rea-state/v1 document as a data part, base64 bytes, a file:// path or an https URL, validated and replaced atomically) and data/get, and the card advertises those operations and an intake declaration. Stage 1 is read-only: write tools are not served in state mode. Without --state nothing changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(environment): record verification after merging the state view's review fixes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(environment)!: serve the environment state by default environment-serve derives the environment state at startup by running the environment-state view in-process on the capture with the manifest's template rules, so an environment comes with its state and a user supplies nothing extra. The derived Evidence is the same one inspect-analysis-view produces by hand. --state is removed; --replay-only serves exactly the stateless replay of main. When the state cannot be derived, or its catalog does not fit the discovery budget, the server starts in replay mode, logs the reason and reports it in the stop summary's `state`. Exported bundles serve the state by default too: export derives it the same way, so the verifier's tool count and checked answer match what is served, and the README describes the served mode. BREAKING CHANGE: environment-serve answers read tools from the derived state and does not serve write tools unless --replay-only is given; the stop summary reports `state` instead of `state_evidence_id`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): bound data-plane replies, keep batch order, cancel intake on stop - One /agentenv response is held to 64 MiB: replies are measured as they are produced and one past the budget becomes a -32000 error stating it. - Every message of a batch enters the arrival-order queue on arrival, so another request's reset never lands between them. - Stopping the server, or a caller leaving, cancels the active download and answers queued calls `cancelled` without running them. - file:// URIs name only this host: another host or a network share is refused before anything is opened. - A loaded view value may not give an entity another identity. - List answers refuse a member lacking a field every recording carried, as item answers do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): keep bodies too deep for the state's nesting out of the state A recorded body at the JSON depth limit was accepted by extraction, then nested a few levels deeper as a document or entity value, so sealing the state Evidence threw and environment-serve and environment-export stopped instead of falling back. stateBodyJson, the one rule extraction and serving share, now treats a body nesting deeper than the limit minus 16 levels as unusable, so its tool stays a recorded view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): measure data-plane replies before building them 83fcc739 bounded one /agentenv response to 64 MiB, but it still serialized each reply whole before measuring it, so a batch of data/get calls on a large state built every refused reply in full only to drop it. Each reply is now measured in bounded JSON parts (the shared jsonParts encoder), its parts kept only while it fits; a reply past the budget is counted for its exact reply_bytes but never assembled. A test checks that a refused read is never handed to JSON.stringify whole and that its reply_bytes is exact. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): release batch replies as they are encoded; judge exact numbers by value answerBatch kept every settled reply in its pending array until the batch ended, so a batch alternating data/add and data/get held each loaded state alive; each reply now leaves the queue as it is encoded. The exact-number policy judged a number by its recorded spelling, so a state loaded with 1e20 came back from data/get as 100000000000000000000, which data/add refused, breaking the promise that data/get output loads back unchanged. A number is exact only when both its recorded spelling and the one serialization writes are safe, so integers from 2^53 below 1e21 are refused in any spelling; replay keeps such bodies as recorded text. A domain test checks that every accepted number is accepted again once written back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(environment): keep room for refusals and framing in the reply budget The response budget counted accepted replies only: a budget error that replaced a reply, and a batch's brackets and commas, were not charged, so near 64 MiB later refusals pushed the body past the advertised limit. Every reply still to come now keeps room for its own budget error, and a batch keeps room for its framing, so a refusal always fits and the body never passes the budget. Reply ids and which messages are answered come from one place shared by the replies and the reserve. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 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> * fix(environment): keep merged export checks on the shared test graph Main's export tests installed module mocks for the whole services project, which reuses one module graph. A tarball read failure then missed its importer, and a one-shot heap mock could be taken by another file. Read those through bindings the tests replace for one case. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(environment): keep a state file whose close failed owned until it closes A file:// data/add that could not close its descriptor dropped the handle, and an admission failure whose cleanup close failed dropped its owner, so nothing could retry the close or report it. The read now runs through withOwnedRegularFile, and a failed close is retained in a server-lifetime ArtifactResourceScope. The next file read retries it first and answers -32000 while it is still open; inline and https documents still load. Closing the served environment retries it again and rejects with the unfinished close. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com> Co-authored-by: gensokyo-dev <gensokyo-dev@users.noreply.github.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: morluto <morluto@users.noreply.github.com> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |
||
|
|
f86206535f |
fix(ci): validate artifact MCP replies against named schemas (#6021)
Bind artifact lifecycle and analysis calls to their advertised named SDK output schemas, sharing discovery per connection and rebinding on reconnect. Reject schema overrides and ambiguous catalogs, preserve request options, and retain primary failures while attempting all owned cleanup. Add real-stdio boundary regressions for malformed output, discovery reuse, reconnection, schema ambiguity, override rejection and timeout preservation. Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage) Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing) |
||
|
|
c538a843cb |
fix(ci): keep Windows ACL observation in SID form (#5941)
Observe private-runtime ACL ownership, trustees and rule count from one SID rule collection. Guard the account-name presentation member through the owning PowerShell type and verify that guard is installed. Keep the original15s probe deadline and every ACL/readonly assertion. Record bounded phase diagnostics and document the observed failure boundary. The repeated historical timeout cause is unconfirmed; no retry or deadline increase is presented as a fix. Validation: complete current-head CI passed40 jobs with one source-only skip; real Windows typecheck, curated/native controls, package and Node24/22 checks passed. PowerShell7.5.2 API/parser experiment and278 routing regressions passed. Full evidence: https://github.com/morluto/rea/actions/runs/39599008194 Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage) |
||
|
|
905cbaf239 |
perf(ci): use tsrs and reduce PE acceptance startup (#5795)
Use pinned tsrs on supported development hosts while retaining stable official TypeScript on Windows and unsupported platforms. Partition compile/typecheck caches by actual compiler and qualify fallback hosts for compiler inputs and lifecycle hooks. Reduce PE acceptance startup through the existing bounded compiled CLI. Retain upstream named MCP definitions, every fixture/assertion and the original 30s deadline. Verify that browser transport loss preserves the observed target. Validation: full qualification and real host lanes in https://github.com/morluto/rea/actions/runs/39590450889 ; 450 focused regressions passed with two documented conditional skips. All 1724 production emit files match SHA-256 and size across both compilers. Current-head Codex/Greptile review found no actionable issues. Measurements and limitations are in the PR. Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage) |
||
|
|
ea24207b57 |
perf(ci): pack each test tier from its own timing history (#5799)
* perf(ci): pack each test tier from its own timing history Fast shards were still ordered with the latest full-suite timing artifact, which stayed stale across compiled-CLI session reuse. Publish and download test-timings-fast and test-timings-full separately, and keep the legacy artifact as a fallback until a tier has its own history. * perf(ci): drop the shared timing-history fallback Shard lookup now reads only the artifact for the current tier. A missing artifact leaves history unset instead of packing from the old test-timings file. * test(ci): look up fast history when only full timings exist The empty-history case now requests the fast tier against a full-tier artifact and checks that the fast lookup ran and returned nothing. A missing tier stays a separate test that does not query. --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> |
||
|
|
0ad42752d3 |
perf(test): reuse one compiled CLI for the remaining hot command files (#5784)
Go, IL2CPP, dylib resolution, and application-workflow tests were still starting a compiled CLI for every command. They now reuse one process per file. Warm focused runs dropped from 40s, 46s, 35s, and 21s to 14s, 21s, 20s, and 2s. Co-authored-by: Cursor Agent <cursoragent@cursor.com> |
||
|
|
71b696582b |
perf(test): reuse one compiled CLI for export-binding parity (#5679)
* perf(test): reuse one compiled CLI for export-binding parity The slow export-binding cases each spawned the compiled CLI three times. One warm process now serves those JSON commands from a single command instance, so startup and retained registrations are paid once per file. Co-authored-by: morluto <morluto@users.noreply.github.com> * style(test): format the warm CLI session oxfmt --check rejected the session and its worker. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(test): report warm CLI shutdown, deadlines, and exit status A compiled CLI session that needed a signal after stdin closed reported success. A command that never answered left later checks waiting, and a failure recorded only on process.exitCode was returned as status 0. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(test): close the warm CLI worker when a status check fails The failure-then-success case only closed the compiled worker after both assertions passed. Register the close with the test so a failed check still stops the child. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(test): retain a timed-out compiled CLI worker until it exits A request deadline cleared the child before SIGKILL was observed. The next command could start a replacement, and close could miss the original process. Retired workers stay owned until exit, and a failed stop remains for a later close to retry. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(test): reject a compiled CLI launch that close interrupts Closing during the ready handshake detached the child before the launch promise settled. The queued command then waited on the startup timer. Close now rejects that startup before the child is detached. 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> |
||
|
|
ccfaf520b7 |
perf(test): reuse one compiled CLI process per JavaScript application file (#5676)
* perf(test): reuse one compiled CLI process per JavaScript application file analyzeJavaScriptDirectory CLI cases were still starting a fresh process after stdio MCP reuse. Keep one compiled process for the same child environment so later cases skip Node and CLI startup. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(test): bound shared CLI worker lifetime Retire a worker that reports a fatal failure before resolving that command, and wait for it to exit before the next command starts. Join a session frame once its bytes are complete instead of copying the unfinished buffer on every chunk. Restart the shared process after 32 commands or a reported 1 GiB resident set so one file does not keep a single heap high-water mark. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(test): retire a shared CLI worker after a transport failure A malformed session frame rejected the command and sent SIGTERM without clearing the worker. signalCode stays unset until the process exits, so the next queued command could write to that same process. Transport failures now use the fatal-reply retirement path and the queue waits for that exit. 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> |
||
|
|
df8b4d8a5a |
fix(process): token-check identityless exit-refresh replacements (#5675)
* fix(process): token-check identityless exit-refresh replacements A launcher-exit refresh could drop a reparented grandchild that was absent from the prior snapshot and report cleanup complete, or publish a verified empty lineage, without reading its run token. Fixes #5206 Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(process): re-read identityless refresh rows when relations change Lineage refresh classified every pre-existing process as a newcomer, and it skipped a row after caching its first parent and group. Seed the exclusion set from the initial snapshot and read a row again when that relation changes. Co-authored-by: morluto <morluto@users.noreply.github.com> * style: format files oxfmt rejects on main Repo-wide format:check fails on these two files at current main. Align them so the process-ownership fix can pass the required static check. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(process): keep owned groups found while confirming exit An unreadable exit-refresh row used to hide the confirmation table, and revalidation dropped groups discovered after the plan was built. Both now stay in the same cleanup, and confirmation reads are bounded. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(process): reclassify lineage rows when tree membership changes Initial outsiders and cached refresh rows are read again when a parent, group, or ancestor move changes launcher-tree membership. Unchanged initial rows stay unread. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(process): re-read cached identityless lineage tokens Parent and group do not identify a process generation. A row whose token was read is read again on the next refresh, so a reused PID cannot keep a verified descendant. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(process): revalidate an owned group that reappears A group discovered after it was already processed is queued once more. Another appearance stays unresolved instead of reporting cleanup complete. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(process): recheck a helper that changes groups during confirmation The confirmation table can move a token-matched member into a new group. That row is read again, and cleanup signals the group it belongs to now. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(process): publish one lineage row when a descendant returns A refreshed descendant replaces the initial row for the same PID, including when its group moves away and then returns to the original relation. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(process): re-read foreign PIDs on the exit confirmation table A readable foreign token does not identify a process that later reuses that PID. The confirmation table reads those newcomers again. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(process): recheck a pre-exit PID whose relation changes An unchanged pre-existing row stays unread. A prior PID whose parent or group changed is token-checked, so a reused owned process is not skipped. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(process): recheck an initial descendant after its token matches A successful read in the first lineage pass marks that PID token-checked. A later refresh reads it again, so a reused PID cannot stay verified. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(process): recheck the launcher on each lineage refresh A later refresh reads the launcher PID again. A missing or unowned launcher is unavailable instead of rooting a verified lineage. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(process): publish lineage from the latest refresh table A descendant missing from the latest refresh is omitted. A refreshed launcher whose group or command no longer matches stays unavailable. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(process): cover a refreshed launcher parent mismatch A same-token launcher whose parent no longer matches the committed expected parent is unavailable, same as a group or command change. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(process): recheck a token-read helper that returns to its group A confirmation table dropped a previously matched PID once its parent and group matched the pre-exit row, so cleanup could signal only the group it had joined and report success while that helper survived. 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> |
||
|
|
335c042d16 | docs(testing): reference the configured duplication limit (#5758) | ||
|
|
c0cbbf8d50 |
perf(ci): keep fast built shards under ten minutes (#5652)
* test(acceptance): split competing loader ownership across files The loader matrix was one 578-second file, which set the floor for any shard that received it. Three files keep every CLI and MCP case and let workers overlap them. Co-authored-by: morluto <morluto@users.noreply.github.com> * perf(ci): run eight fast built shards under a ten-minute budget Charge each Vitest project by its resolved worker width so serial process-boundary files spread as tail time. Fast feedback uses eight built shards. The npm download cache stays; node_modules is too large to ship as a shared artifact. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(ci): keep each scheduled file on one worker lane Dividing a file by maxWorkers dropped its own wall-time floor and could pack a parallel file onto a serial tail. Place each file whole on a lane, overlap peers only inside a sequence group, and add later groups after. Co-authored-by: morluto <morluto@users.noreply.github.com> * docs(testing): separate the shard budget from workflow time The ten-minute figure is the built shard job. Classification, build, and the portable-test merge are measured separately on run 39451548945. Co-authored-by: morluto <morluto@users.noreply.github.com> * docs(testing): match fast shard count to lane scheduling Main still described five shards and half-duration weights. Fast qualification uses eight shards, and each file keeps its full duration on one worker. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(ci): seed split loader durations from pre-split history Timings published before the file split still name one 578-second path. Until a new file appears in that artifact, share the recorded duration by the pre-split case counts. 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> |
||
|
|
9d8e780332 |
ci: keep npm download caches from Turbo snapshot growth (#5655)
* ci: keep npm download caches from Turbo snapshot growth Per-commit static and portable Turbo snapshots had filled the 10 GB Actions cache, which is what makes warm npm ci cheap. Trusted static runs now keep two generations and one download-cache writer per host. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(ci): declare cache retention types for strict checks Typecheck imports cache-retention.mjs and needs a sibling declaration. The generation count stays module-private so knip does not report it. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(ci): keep compatible caches and qualification read-only Npm dedupe deletes a record only when another has the same key, version, and ref. Cache deletion moves to a follow-up workflow so reusable qualification can keep its read-only token. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(ci): retain caches after failed default-branch runs Static and build save Turbo snapshots before later lanes finish. Retention now follows a failed, timed-out, or cancelled trusted run, not only a green one. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(cli): pass application trace input as a file The CLI already reads workflow JSON from a path. Putting the full application Evidence document on argv exceeds the runner argument limit. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(ci): retain deep and Knip snapshots without deleting a repeated id Fast and deep static checks publish rea-static-deep-v1 and knip-meta-v1 entries per commit. Retention prunes those families with the same two-generation rule. A cache id listed twice is one record; inconsistent repeats abort before any delete. 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> |
||
|
|
40428da1dd |
perf(test): reuse one stdio MCP server per JavaScript application file (#5658)
* perf(test): reuse one stdio MCP server per JavaScript application file Repeated analyzeJavaScriptDirectory MCP cases started a full server for every case. Share one file-scoped server and compile cache so later cases skip that startup while CLI cases still launch a fresh process. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(test): close in-flight shared MCP startup with the file File teardown waits for a stdio session that is still starting, skips a server once close has begun, and still closes one registered during that wait. The later-case reuse test can run without the earlier case. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(test): keep a failed MCP handshake when cleanup fails The shared session reports the startup error and carries the cleanup failure as its cause. A cleanup that failed stays owned and is retried on close without running a cleanup that already succeeded. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(test): fail shared MCP cleanup when the rejection has no reason A cleanup rejection of undefined still fails the drain and stays owned. Close caches completion only after every retained cleanup succeeds, so a later close can release it. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(test): keep one MCP server while failed cleanup is retained A later call retries retained cleanup before opening another server. The new server starts only after that cleanup succeeds. 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> |
||
|
|
0add6a5aae |
ci: split fast and deep static checks (#5634)
* ci: split fast and deep static checks Fast PRs run typecheck, lint, and format before provider admission. Knip, duplication, architecture guards, and Python stay on the full tier. Shared-boundary fallbacks keep the Linux x64 baseline, and Turbo jobs export remote-cache credentials when they are configured. Co-authored-by: morluto <morluto@users.noreply.github.com> * ci: keep pull requests from writing the remote cache Trusted default-branch runs still receive TURBO_TOKEN. Pull requests get an empty token and remote read-only mode. Knip saves a per-commit cache key so the next trusted full run can refresh the restored snapshot. Co-authored-by: morluto <morluto@users.noreply.github.com> * ci: forward the release cache token and upload deep static reports Release qualification now passes TURBO_TOKEN into the called workflow. Labeled pull requests still do not. The deep static job records its task context and uploads duplication reports after a failed gate. Co-authored-by: morluto <morluto@users.noreply.github.com> * style: format the turbo cache policy test Co-authored-by: morluto <morluto@users.noreply.github.com> * ci: keep fast checks exclusive and trusted cache writes explicit Declare the static artifact name and context script so typecheck matches the implementations. Lock check:ci:fast around dist, and publish the remote cache only for release qualification or default-branch push, schedule, and dispatch. Co-authored-by: morluto <morluto@users.noreply.github.com> * ci: record static task graphs without nesting the artifacts lock Keep check:ci:fast locked, and point graph recording at the unlocked check:ci:fast:tasks script so check:pr and check:test can record hashes while they already hold that lock. Co-authored-by: morluto <morluto@users.noreply.github.com> * ci: keep unauthenticated Turbo runs on the local cache Open pull requests do not receive TURBO_TOKEN, so a remote read mode cannot authenticate. Those runs now use the local cache. Trusted runs still publish. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(ida): treat unchanged invalid requests as nonretryable Main already stopped marking invalid_request retryable. The pull request merge runs that projector, while the IDA lookup tests still expected retryable true. Match the merged behavior. 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> |
||
|
|
7a0c47bfa4 |
feat(environment): export an environment manifest as an agent environment bundle (#4999)
Export an authenticated capture and environment manifest as a pinned agentenv bundle with provenance, a replay verifier and smoke task. Followups preserve immutable input ownership, bounded discovery, caller paths and numeric values; bind bundle writes and package copying to retained filesystem owners; verify POSIX modes; retain cleanup authority; and verify framework/npm executable selection. Default MCP remains stdio. Validation: pinned Linux toolchain, typecheck/build/lint/format/docs/knip, 452 focused tests, ten product-catalog cases, real GitHub response replay in the generated non-root Docker image, and the real pinned agentenv framework smoke workflow. Platform and resource-measurement limits are recorded in the feature verification document. Co-authored-by: gensokyo-dev <gensokyo-dev@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
49e67aa1d9 |
fix(process): retain native ownership evidence through cleanup
Keep a run-scoped evidence owner from acquisition through settlement and cleanup retry. Bind token observations to native generations and retain related generations and unresolved identity lookups across table omissions, reparenting and process-group changes without treating PID hints as authority. Use native effective UID facts for withholding decisions, corroborate Linux procfs absence, and share the Linux stat parser with sampling and debugger identity checks. Signal only after current token and group revalidation. Complete swept cleanup across all groups with one bounded final family check; retain unresolved owners and successful-peer completion across retries. Validation: npm run check, docs:check and test discovery passed. Focused ownership/consumer coverage totals 513 passed and 1 skipped across 35 files, including the corrected Electron cancellation test rerun independently. Darwin helper compilation, real owned Node child cleanup, CLI/MCP capture and retained cleanup retries ran. Real Electron applications, native Linux races/PID reuse and Windows cleanup were not qualified. The original Linux reports remain open for that work. Fixes #5238 Refs #4322, #5206 |
||
|
|
b999e72476 |
fix(ci): repair capture ownership and portable ABI validation (#5224)
* fix(tests): restore reliable snapshot and container CI checks Keep exact cancellation causes and partial snapshot facts in regression oracles. Match fault injection to real directory handles and isolated MCP module ownership; await terminal cleanup progress within the existing test deadline. Reuse the valid ASAR Pickle fixture and preserve truncated-container rejection. * fix(tests): isolate runtime faults and own CLI subprocesses Keep the runtime provider mock in the isolated project after reused CLI graphs exposed lost fault injection. Use the existing owned CLI fixture for Inspector parity and update command checks, retain caller environment choices, and require the removed alias to fail with COMMAND_NOT_FOUND. Keep current test deadlines and production behavior. * fix(process): retain executable handles through read cancellation Use the existing borrowed descriptor reader so stream cancellation cannot invalidate a handle owned by capture. Preserve the exact cancellation and permit immediate scope reuse after cleanup. Reproduce the native-stream failure with actual file IO and retain completed/failed-close controls. Synchronize runtime cancellation and backwards-clock injection with observed running progress. The corrected clock oracle now rejects a Date.now-based deadline under controlled rollback; keep test deadlines and narrow host cleanup checks unchanged. * test(process): observe prelaunch cancellation at descriptor reads * fix(process): retain read failures alongside observed cancellation * fix(flutter): advertise portable Unicode ABI selectors |
||
|
|
093ce695f0 |
fix(tests): preserve temporary fixture ownership
Normalize shared test fixture prefixes using the hygiene verifier ownership rule. Preserve caller labels, existing owned names, and third-party caches; cover retained fixtures and exact cleanup through subprocess regressions. |