Skip to content

fix(ci): repair capture ownership and portable ABI validation - #5224

Merged
gensokyo-dev merged 10 commits into
mainfrom
fix/ci-baseline-5207
Oct 19, 2026
Merged

gensokyo-dev merged 10 commits into
mainfrom
fix/ci-baseline-5207

Conversation

@gensokyo-dev

@gensokyo-dev gensokyo-dev commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Problem and change

Repair required CI blockers at their producing boundaries:

  • Cancelled executable sampling can invalidate a native Node FileHandle stream and leave its capture scope blocked. Reuse the existing borrowed descriptor reader; retain physical I/O failure, independently observed cancellation and exact failed-close ownership without discarding any of them.
  • Main 64abd4aef introduced an ABI selector pattern rejected by JavaScript v mode and clients without look-around support. Preserve literal Unicode labels through the shared CLI/MCP contract, advertise JSON Schema maxLength, and enforce the same code-point bound with a capped iterator before the portable slash check. No label-sized copy is allocated.
  • Correct stale snapshot/Evidence/ASAR assertions and native-close injection; move the two shared-worker module mocks to the existing isolated project; use owned CLI subprocess fixtures; synchronize cancellation and wall-clock tests with actual running progress. Existing deadlines, prerequisite skips, coverage thresholds and required lanes remain unchanged.

No new target authority or provider capability. Controlled Node children, disposable APK/file fixtures and loopback Inspector only; downloaded applications and external reverse-engineering providers were not executed.

Executed validation

  • Clean main 048d70755: five implicated files reproduce 10 failures, 43 passes, 2 existing skips; clean-main execution also reproduces shared-worker mock ordering.
  • Ownership regression rejects the old native-stream producer. Follow-up 2ef87e634: 65 pass, 4 existing skips across 8 files. All four injected pending-read/system-error/close combinations reject the older implementation; exact primary/cancellation facts, cleanup retry and immediate scope reuse pass after the fix. Lifecycle/ownership previously passed 29/29; replacing the monotonic clock with Date.now() fails the corrected oracle, and the real source was restored. Earlier broader CLI/MCP/snapshot/Inspector controls: 103 pass, 2 existing skips.
  • Integrated main through a0edd145d. The advertised-pattern test reproduces the new ABI regression before this fix. After it, 26/26 tests across 3 files pass: CLI selection, real MCP SDK transport, AJV 2020-12 schema/admission agreement, JavaScript plain/u/v patterns, Unicode limits and all four trailing line terminators. APKs are fixtures; grammar-only cases use an injected provider.
  • Final npm run check passes types, lint, formatting, module/unused-code and architecture guards. Documentation checks and 5 onboarding tests pass; 1,643 files discovered exactly once.
  • Compiled CLI/Node control before/after the capture repair exits 0 with identical executable SHA-256, scenario commitment and captured output. Elapsed 5.25/4.28 s, CPU 5.91/4.96 s, sampled process-family RSS 460.7/463.5 MiB. One fresh process each; OS cache/host interference uncontrolled and main advanced. No attributable speedup is claimed.
Completed local task Elapsed CPU Sampled family RSS
Capture follow-up, 8 files 6.52 s 7.73 s 516 MiB
ABI tests plus required artifact build 79.18 s 126.07 s 3,097 MiB
Final static checks 83.04 s 163.63 s 4,505 MiB
Final documentation/onboarding 11.63 s 14.76 s 761 MiB

Linux, Node 24.18.0/npm 11.16.0; two CPUs, 3 GiB V8 cap and 8 GiB sampled RSS guard. RSS uses 20 ms sampling, may double-count shared pages and miss short-lived/reparented children. Agent tokens and CI-wide cost are unmeasured. An earlier Windows update-help timeout predates this PR; the owned fixture repairs its lifetime, while that stall's cause remains unconfirmed. Later complete Windows lanes passed. Current-head CI/reviews must qualify this final diff.

Author readiness

Human owner: @gensokyo-dev

The owner explicitly authorized ready PRs and delegated the declarations, waiving a separate personal final-diff review. Codex reviewed the diff and executed the stated checks; independent human review was not observed.

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T11:22:03.523538Z 5f27222 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed changes appear safe to merge; no actionable defect was found.

Summary

Repairs executable sampling ownership and makes Flutter ABI validation portable across CLI and MCP clients.

  • Executable sampling leaves descriptor cleanup with the capture scope.
  • Flutter ABI labels follow one portable Unicode rule across clients.
  • CI tests check current outputs and wait for capture progress.

The previous and current commits have different merge bases with the target commit, so this review covered the full PR diff. No previous review threads were supplied. GitHub access required authentication, so supersession and remote thread history could not be checked. Tests were not run during this review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Sample selected executable] --> B[Borrow descriptor for positional reads]
  B --> C[Wait for read to settle]
  C --> D[Owner closes descriptor]
  D --> E{Close succeeds?}
  E -->|Yes| F[Return observation or retained read failure]
  E -->|No| G[Retain exact owner for cleanup retry]
  C --> H[Keep read error and observed cancellation separate]
Loading

Reviews (6) · Last reviewed commit: "fix(flutter): advertise portable Unicode..." · Reviewed by Greptile

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.
@gensokyo-dev gensokyo-dev changed the title fix(tests): restore reliable snapshot and container CI checks fix(tests): repair CI snapshot, container, and runtime fixtures Oct 19, 2026
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.
@gensokyo-dev gensokyo-dev changed the title fix(tests): repair CI snapshot, container, and runtime fixtures fix(process): retain executable ownership through cancellation Oct 19, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9494e46c97

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@gensokyo-dev gensokyo-dev changed the title fix(process): retain executable ownership through cancellation fix(ci): repair capture ownership and portable ABI validation Oct 19, 2026
@gensokyo-dev
gensokyo-dev merged commit b999e72 into main Oct 19, 2026
43 of 45 checks passed
@gensokyo-dev
gensokyo-dev deleted the fix/ci-baseline-5207 branch October 19, 2026 11:32
@github-actions github-actions Bot mentioned this pull request Oct 19, 2026
3 tasks done
David-the-happy-piglet added a commit to David-the-happy-piglet/rea that referenced this pull request Oct 20, 2026
Integrate main at 8443692 while retaining the published PR history. The snapshot expectation is already fixed upstream in morluto#5224, so the PR diff now contains only the compressed-integer decoder and its regressions.

Verified current-main regressions fail in seven target cases; the updated branch passes 241 related tests with two Windows-only skips. Static checks, test discovery and independent review passed.
kaoru0822-kitauji added a commit to To3akaRin/rea that referenced this pull request Oct 21, 2026
main's morluto#5224 and morluto#4941 rewrote the snapshot, capture-progress, ZIP and runtime-observation tests that this branch's shared test-hardening commits patched. Take main's version of those files so the branch diff is only the HAR entry-scoping fix (12c6316).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kaoru0822-kitauji added a commit to To3akaRin/rea that referenced this pull request Oct 21, 2026
main's morluto#5224 and morluto#4941 rewrote the snapshot, capture-progress, ZIP and runtime-observation tests that this branch's shared test-hardening commits patched. Take main's version of those files so the branch diff is only the ARM32 Mach-O slice fix (1ccb40d).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kaoru0822-kitauji added a commit to To3akaRin/rea that referenced this pull request Oct 21, 2026
main's morluto#5224 and morluto#4941 rewrote the snapshot, capture-progress, ZIP and runtime-observation tests that this branch's shared test-hardening commits patched. Take main's version of those files so the branch diff is only the Webpack loader-alias changes (bdd57b4, 641f662, 3a0fd8a).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kaoru0822-kitauji added a commit to XY-code1/rea that referenced this pull request Oct 21, 2026
main (morluto#5224) rewrote the update CLI test with the cliTest fixture. Keep that fixture and reapply this branch's split, so help output and the removed upgrade command each run under their own test deadline.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@morluto morluto added area: build Build, CI, packaging, and publishing bug Something isn't working labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build Build, CI, packaging, and publishing bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants