Commit Graph

376 Commits

Author SHA1 Message Date
Adolanium b09c6b0752 fix(apple): keep dyld candidates inside the analyzed root on Windows (#6955)
FilesystemTreeView mapped root-relative dyld paths to host paths with path.join. On Windows a component such as ..\outside\x.dylib was normalized out of the analyzed root, so a file outside it was opened, parsed and hashed. Components containing a backslash or colon are now absent on Windows, Windows link text is split on backslashes, and every host path is checked to stay inside the root before it is opened.
2026-10-24 16:10:18 +08:00
morluto 77be87db99 fix(artifacts): describe observed inventory scope accurately 2026-10-24 16:08:26 +08:00
morluto 0c49878b9a fix(macho): preserve subtype labels across dylib consumers 2026-10-24 16:08:26 +08:00
gensokyo-dev 4a041ae753 perf(artifacts): bound stable reads to one snapshot buffer (#6966)
* perf(artifacts): read stable files into one bounded buffer

* perf(artifacts): fill stable snapshots through direct descriptor reads

* docs(perf): qualify stable snapshot memory with real ELF and BEAM tasks

* test(artifacts): count descriptor close retries from admission

* test(artifacts): capture the retained descriptor after asynchronous admission

* docs(perf): record integrated qualification and cleanup fixture correction
2026-10-24 15:49:41 +08:00
Dery Ferdika 98ec00f406 fix(setup): preserve cleanup ownership and resource reports (#6920)
* fix(setup): report host-owned cleanup resources alongside the primary's

SetupHost.close documents that it reports the resources a setup host still
owns, but its contract returned only a string. runSetup therefore built the
ProviderCleanupError from the primary failure's cleanupResources alone, so a
resource the host failed to release reached the projection only inside a
free-text reason while the error asks the caller to review the reported local
resources.

Return a SetupCloseReport instead. closeSetupResources absorbs the structured
resources of any cause that reports them, through
ArtifactReaderFailure.cleanupObservation, and leaves opaque failures
message-only so no resource name is invented. runSetup then unions the host's
resources with the primary's before building the typed cleanup error.

Two boundary tests read the close result directly: the skill-cleanup case now
asserts the retained backup path in the report reason rather than in a bare
string, and the shared ownership helper takes an opaque close result because it
only ever awaits undefined from either host it is given.

Validation: RED then green in src/application/Setup.recovery.test.ts, where
the new case previously received only the primary resource; 116 tests across
the seven Setup and cleanup-ownership suites pass; tsc --noEmit over the
changed set, its setup callers, and both boundary tests exits 0; oxlint
reports 0 errors; oxfmt --check is clean; verify:module-boundaries passes.
The two failures in src/setupEnvironment.test.ts reproduce identically on
pristine bded9c628 with this change stashed.

* fix(setup): preserve cleanup ownership through host reports

* fix(setup): bind finalization reports to cleanup owners

* fix(setup): retain live resources in returned cleanup views

* fix(setup): preserve completed cleanup and exact installer resources

* fix(setup): retain delegated cleanup across authority changes

* fix(setup): compose callback and source cleanup authorities

* fix(setup): retain producer cleanup failure reasons

* fix(cli): render structured setup cleanup resources

* fix(setup): separate failure evidence from cleanup ownership

* fix(setup): normalize close failures and unify lease binding

* fix(setup): preserve direct lease resource attribution

---------

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-10-24 15:08:10 +08:00
morluto 1d896e03b7 fix(artifacts): retain original I/O failure evidence 2026-10-24 12:21:44 +08:00
morluto ddfd060210 test(artifacts): verify ZIP cancellation through extraction rollback 2026-10-24 12:07:33 +08:00
morluto 6843dbea9b fix(native): preserve bounded JVM identity before FAT admission 2026-10-24 12:07:33 +08:00
morluto cd10ee1f8a refactor(macho): centralize FAT declaration facts 2026-10-24 11:09:17 +08:00
morluto cc18e9ad0d fix(native): decode plist sources within result capacity
Derive ordinary plist depth from existing JSON result capacity while preserving archive limits. Decode supported XML and safe JSON directly from owned source bytes; retain conversion for OpenStep, unsafe numeric classification and unsupported encodings. Preserve typed scalar facts, truthful provenance, cleanup ownership and explicit capacity recovery.
2026-10-24 10:17:23 +08:00
morluto 33f384120a fix(apple): preserve asset catalog rejection context
Retain the selected catalog path with captured assetutil failures and malformed metadata. Map two explicit selected-path invalid-catalog diagnostics to the existing format error while preserving other failure classifications. Verify the observed diagnostic through the real CLI and stdio MCP using a truncated temporary catalog and an unchanged valid control.
2026-10-24 09:36:15 +08:00
morluto 9c8f404421 refactor(artifacts): retire the test-only materialization facade
Use the active in-scope materializer directly from the existing inventory fixture, with the same explicit resource-scope admission and cleanup owner. Keep staged snapshot mutation and extraction lifecycle regressions intact.
2026-10-24 09:28:35 +08:00
morluto 9d4293be27 fix(apple): preserve byte identity in metadata names
Use one lossless Mach-O name projection for symbols and dependency paths, retaining undecodable bytes and partial binding facts. Keep referenced NIB string failures unknown and preserve their source nodes through the shared lazy projection. Valid Unicode, readable sibling metadata and weak-bind scope remain usable.

Exercise the producer and CLI/MCP consumers, and align date-overlap and object-capacity fixtures with their owning archive contracts without relaxing admission or omission assertions.
2026-10-24 08:30:40 +08:00
morluto 04ba5caf63 fix(artifacts): preserve cancellation observed during directory sync 2026-10-24 08:22:14 +08:00
morluto 7c88ef14af fix(artifacts): retain failed native DMG attachment provenance 2026-10-24 08:22:13 +08:00
morluto 54a663ddd5 test(lifecycle): align cleanup fixtures with owned resource contracts 2026-10-24 08:22:13 +08:00
morluto f90d40720f refactor: retire redundant parsing and workflow facades
Keep Mach-O UUID interpretation at reconciliation, environment values at the details owner, and inventory scope admission at the public operation. Remove the obsolete UUID scalar, duplicate DSH dispatch, two intermediate inventory exports, and unused body-cutoff predicate.

Keep test resource scopes explicit and cover oversized bodies through the real comparison workflow. Correct stale DSH invalid-result assertions and model DMG cancellation with the command owner, retaining an opaque AbortError control and mount cleanup checks.
2026-10-24 08:00:55 +08:00
morluto 4610843efd fix(filesystem): preserve failure provenance across cleanup owners
Carry descriptor outcomes, cancellation, retention and physical origin as named facts so wrappers cannot drop ownership context. Replace raw primary failure unwrapping with provenance facts across artifact consumers, and use Result for Kuna span reads including undefined rejections.

Exercise actual descriptors, rollback, cancellation and cleanup retry; update brittle snapshot and completion fixtures to use their producing boundaries.
2026-10-24 07:43:49 +08:00
morluto 231e458246 fix(native): preserve parsed section and architecture facts
Classify lipo parse failures once for native and artifact consumers, retain valid read-only ELF ranges independently of optional section names, and map IL2CPP reader architecture through the existing CPU identity owner before Mach-O parsing.

Regression-first checks reproduced malformed lipo output, lost unnamed-section compiler paths, and the amd64/x86_64 adapter mismatch. Focused parser, artifact, Rust CLI/MCP, Go, and IL2CPP controls passed; authored fixtures do not establish real-provider behavior.

Fixes #5982

Fixes #3397
2026-10-24 07:28:09 +08:00
morluto 0134e15ab1 refactor(process): centralize captured command failure facts
Project admitted output facts beside the command owner and remove adapter-local copies. Preserve byte-count omission, explicit signal and exit facts, and caller-specific truncation and failure policies.

Update ADB timeout regressions to assert the existing prerequisite frame and original process cause, including captured output on both frames.
2026-10-24 06:53:53 +08:00
morluto 91c28e2735 fix(apple): preserve XML plist UID reference identity 2026-10-24 06:43:44 +08:00
xjh 1081008c9d fix(python): preserve source boundaries in pyc previews (#6492)
Preserve source code-point prefix endpoints in the shared marshal UTF-8 decoder, including separately encoded surrogate values. Keep native TextDecoder spans, full validation, byte identity and the existing 80-unit budget. Update the PyInstaller consumer without changing its text contract.

Validation: 207 relevant source tests;24 affected compiled CLI/MCP/filesystem CI tests; independent CPython3.11.2 compiler/marshal oracle and real argparse;18 equivalent performance tasks; build/check passed. Codex reviewed7c0f7abc6b without major findings.

CI bypass authorized for demonstrated baseline-only failures:101 source and179 built cases reproduced on actual tested main ba9c5bc68. Cancelled shard remainder is unverified. See PR body and discussion for scope and evidence.

Fixes #6476
2026-10-24 06:42:13 +08:00
morluto 53601d0bdf merge: consolidate upstream identity and representation owners 2026-10-24 05:13:41 +08:00
morluto e05beb39c2 refactor(apple): reuse artifact stream byte validation 2026-10-24 05:02:09 +08:00
morluto 2b8e388bbe fix(native): unify legacy Mach-O platform interpretation 2026-10-24 04:49:21 +08:00
morluto 7356434202 merge: consolidate upstream ownership and coverage fixes 2026-10-24 04:43:33 +08:00
morluto afc72f32e3 test(pyinstaller): use an absolute drive path for refusal coverage 2026-10-24 04:25:13 +08:00
morluto d69752fd52 refactor(filesystem): share stable read state comparisons
Reuse sameRegularFileState for artifact, native plist and entropy readback.
Remove private copies of identity/size/timestamp checks and consistently include
mode in the existing stable-state contract.

Keep initial identity-only artifact admission, byte-count checks, capacity and
error precedence, symlink choices, cancellation and descriptor cleanup intact.

Validation: stable-file, plist, artifact outcome, entropy and public CLI/MCP
lifecycle regressions passed; static and documentation checks passed.
2026-10-24 04:18:07 +08:00
morluto 5796220f23 fix(native): validate Mach-O command framing before admission 2026-10-24 04:16:47 +08:00
morluto fc11134242 test(pyinstaller): distinguish path and metadata allowance failures 2026-10-24 04:08:59 +08:00
morluto 59a00d77fb fix(apple): retain reader outcomes and cleanup ownership 2026-10-24 04:06:57 +08:00
morluto 6c307e9c86 fix(artifacts): retain declared ASAR companion occurrence facts 2026-10-24 03:59:44 +08:00
morluto 584791fedf fix(apple): own ordered nib collections and registry parentage 2026-10-24 03:16:30 +08:00
morluto 0321bb91a7 fix(apple): align asset allowance and category fixture types 2026-10-24 03:16:30 +08:00
morluto 79323128f2 fix(apple): qualify unexamined nib content coverage 2026-10-24 03:11:07 +08:00
morluto b165b0e830 fix(artifacts): require regular source-map target occurrences 2026-10-24 03:11:07 +08:00
morluto 4d3a7a0589 fix(artifacts): preserve exact ZIP and DMG caller cancellation reasons 2026-10-24 03:11:07 +08:00
morluto 7479f0a464 fix(environment): distinguish destination refusal and write access failures 2026-10-24 03:11:07 +08:00
morluto 661aef55a9 fix: retain completed historical replies through finalization 2026-10-24 03:11:07 +08:00
morluto 1c57eed275 fix(apple): retain binary UID identity through archive projection 2026-10-24 03:11:07 +08:00
morluto dbbaf2abb0 fix(apple): preserve asset failures and authored resource coverage 2026-10-24 03:11:07 +08:00
morluto b488a10d96 fix(apple): retain selected dylib identity after path removal 2026-10-24 03:11:07 +08:00
morluto 693ecec082 fix(artifacts): retain permission omissions through JavaScript lookups 2026-10-24 03:10:43 +08:00
morluto 612bbee947 fix(artifacts): retain dylib enumeration readers through failed cleanup 2026-10-24 03:00:09 +08:00
morluto 03ae514069 fix(artifacts): retain DMG carrier observations when child traversal is unavailable 2026-10-24 03:00:09 +08:00
morluto 15450643f7 fix(firmware): preserve admission and extraction coverage outcomes 2026-10-24 03:00:09 +08:00
morluto 34552ff0df fix(artifacts): preserve typed resource limit diagnoses 2026-10-24 03:00:08 +08:00
morluto c20b707680 fix(native): preserve negative Mach-O admission identity 2026-10-24 02:50:17 +08:00
morluto 35aa8ef839 fix(artifacts): retain DMG producer failures and bound integrity recovery claims 2026-10-24 02:50:16 +08:00
morluto 8b93eff452 fix(apple): preserve archive admission and authored UI dispatch coverage 2026-10-24 02:45:14 +08:00