Skip to content

fix(ci): restore main workflows and captured-state replay - #9763

Merged
N0zoM1z0 merged 14 commits into
mainfrom
cursor/fix-portable-suite-main-aeb2
Nov 10, 2026
Merged

N0zoM1z0 merged 14 commits into
mainfrom
cursor/fix-portable-suite-main-aeb2

Conversation

@morluto

@morluto morluto commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

Portable tests and CI required fail on current main (d4a7c20e). Those failures are what keep the open fix PRs red. No dedicated issue.

Head e99745e4a996a291d9ea056ae4fdab3ccff66e25 adds a two-line test-oracle correction to the original repair. The original repair at 073a5f4594be3e4f4d96b1a53d385899bdbc53cf passed every selected check in CI run 42756079140, including Windows, browser, and environment bundle workflows. Current-head CI run 42760660261 passed every selected job, including all eight shards, Windows native/package/Node 22 boundaries, browser, agentenv, and Linux/macOS package lanes; merged normally after final CI success.

Related: #9770 overlaps the documentation, verifier golden, and safetensors expectation changes; this PR also covers HAR provenance, alias restoration, and Windows verification.

Problem and expected behavior

  • environment-build of a HAR must publish the same capture Evidence as inspect-web-network-capture, including the caller's original path spelling.
  • The no-reader verifier digest, uncapped IDA callee coverage, CLI source-closure refusal, safetensors out-of-file extent, and Windows cleanup message were stale against the producers already on main.
  • docs/desktop-build-witness.md linked #readers and #screen-judges, which were never headings.
  • Selected state aliases were restored twice, and a missing target was created as a directory. Kind now travels with the alias: directories are created, files stay files (their parent is created), unknown leaves stay unknown, and an unknown alias that contains another alias is a directory. An app that owns no files still restores recorded aliases.
  • An oversized Windows Ghidra TCP endpoint was reported as a generic observation failure. POSIX already calls that record invalid.

Change and scope

Ordinary fixes inside existing evidence, export, and test contracts. Not included: new reader or screen-judge task sections, or a change to the safetensors extent-before-conversion order. Contribution scope: not applicable.

Contract and boundary impact

  • Semantic owner and earliest changed stage: environment-build now passes the caller's capture spelling into WebNetworkCaptureService. Alias restoration stays in _ensure_state_aliases, called from both the owned and ownless class bodies. Windows endpoint observation maps a reader limit to the same invalid-endpoint error as POSIX.
  • Contribution scope fit and linked maintainer decision: not applicable.
  • CLI and MCP/tool-catalog contract: HAR environment-build evidence includes caller_input_path with the caller's spelling. No flag or catalog change.
  • Provider, bridge, target-format, or platform compatibility: Windows Ghidra endpoint observation uses the POSIX invalid-endpoint message when the record exceeds the compact bound.
  • Evidence, artifact, provenance, or reconstruction contract: one-shot HAR evidence records the caller path. A malformed artifact inspection is still refused and the CLI error carries the undelivered source closure.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): the Windows verifier matches the message #assertOpen already throws once cleanup has started.
  • Generated metadata: none.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests updated: the CLI refusal assertion now preserves the entire original error projection as well as its additional source closure. Fault injection that drops the parent Evidence falsely passed the prior assertion and fails the strengthened assertion.
  • Tests updated: environment-build byte comparison from a relative grafana.har with caller_input_path grafana.har; verifier digest; IDA callee coverage; CLI source closure; safetensors extent; desktop alias file, unknown leaf, unknown parent, missing file parent, and ownless class; rendered STATE_ALIASES tuples.
  • Base reproduction: the four original suites failed on main at d4a7c20e. The Windows cleanup message and the Ghidra endpoint message were taken from the Windows lane logs. The witness links were the only markdown fragments whose headings are absent.
  • Remaining proof gaps: no live browser, IDA, or macOS run. The Windows lane was not re-run after the last unrelated timeout. The source-closure assertion does not lock the English recovery sentence.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • Independent validation on 073a5f459: seven key files, 187 passed, using pinned Node 24.22.1/npm 11.16.0 and verified same-SHA CI runtime artifacts. Two CPUs; 62.7 s elapsed, 108.8 s user+system CPU, 2.31 GiB peak sampled session RSS (200 ms sampling; shared pages may be counted twice).

  • Updated evidenceBundleFiles.test.ts: 50 passed; original dropped-parent mutation falsely passed, strengthened assertion detects it. Mutation restored; npm run check:fast -- --concurrency=1 and commit/push hooks passed.

  • npm run test:focused on the four originally failing files — 95 passed.

  • npx vitest run tests/boundary/providers/desktopExportPython.test.ts — 18 passed.

  • npx vitest run src/application/desktop/DesktopApplicationExport.test.ts filtered to the alias cases — passed, including an empty state directory.

  • npx vitest run tests/acceptance/modelArtifactCli.test.ts and the impossible-safetensors boundary test — passed after npm run compile.

  • npx vitest run tests/boundary/providers/ghidra/ghidraTransport.test.ts — 5 passed on Linux.

  • npm run check:fast — passed on the pushed head, including the pre-push hook.

  • GitHub on bdff224296e0babe8fc65aace63d0deadf917305: Static checks SUCCESS, Portable tests SUCCESS, Conventional PR title SUCCESS, CI required FAILURE. The Windows job 129621768435 timed out in tests/acceptance/webModuleCli.test.ts.

Compatibility, safety, and release

  • Breaking changes or migration steps: none for flags or settings. HAR environment-build evidence gains caller_input_path. Rendered STATE_ALIASES tuples gain a kind.
  • Real Hopper/Ghidra, browser, or OS coverage: Windows lane ran and failed later on an unrelated timeout. The Ghidra endpoint change itself was not the failing test on this head.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: the recorded path is the caller-selected capture path. Sensitive-path redaction stays in WebNetworkCaptureService.

Author readiness

Human owner: @morluto

  • 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.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.
Open in Web Open in Cursor 

environment-build inspected a HAR without the caller path that
inspect-web-network-capture records, so the published evidence.json
omitted caller_input_path and failed the byte-for-byte portable check.

Also update three stale portable expectations that already fail on main:
the no-reader verifier digest matches the #9185 selector parent, uncapped
IDA callee pages report complete discovery, and a CLI refusal of a
malformed artifact inspection includes the undelivered source closure.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T04:02:40.921925Z bdff224 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.

@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: 48eaf31e32

ℹ️ 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".

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/cli/environmentCommands.ts Resolved
The witness page linked task anchors that were never written, so any
docs-touching PR failed the route check. A selected state directory was
restored as a dangling symlink by a duplicated helper. An empty
safetensors file reports the extent as outside the file before offset
conversion. Windows cleanup refusal uses the runtime's in-progress message.

@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: adabb98dd5

ℹ️ 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".

Comment thread src/domain/desktop/appExportPython.ts Resolved
inspect-web-network-capture records the path the caller typed. The
one-shot build had already absolutized that path, so a relative capture
disagreed with the three-step bundle. The byte-for-byte check now runs
from the capture directory and requires caller_input_path grafana.har.
A missing settings file was created as a directory because the helper
treated any absent path as a directory. The capture's selected path kind
now travels with the alias, and only a directory alias creates its target.
An absent file alias stays a file the app can create.

@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: 481c96e77e

ℹ️ 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".

Comment thread src/domain/desktop/appExport.ts Resolved
Captures written before selected_paths.kind leave the alias unknown.
Defaulting those to a directory makes an omitted settings file a
directory, so a later write through the alias fails with EISDIR.
The export plan was widening a missing selected path kind to string.
Record file or directory only when the capture says so, and unknown otherwise.
The selected path kind was widened to string, so the export plan could
not keep the file, directory, or unknown distinction.
The export now records whether a selected alias is a directory. The
rendered STATE_ALIASES tuples include that kind.
The POSIX read maps a record past the compact endpoint bound to
"Ghidra TCP endpoint is invalid". The Windows lease reported that same
bound as a generic observation failure, so an expanded endpoint failed
the Windows lane with a different message.

@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: 9482a836b3

ℹ️ 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".

Comment thread src/domain/desktop/appExportPython.ts Resolved
…tory

A capture written before selected path kind can still nest one alias
inside another. That parent is a directory. A legacy leaf stays unknown
so a missing settings file is not created as a directory.

@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: 938417fcf6

ℹ️ 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".

Comment thread src/domain/desktop/appExportPython.ts Resolved
An empty state directory does not become an owned path, so the class
was ownless and never called _ensure_state_aliases. The ownless class
now restores aliases whenever the export recorded some.

@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: 3bfd458f2d

ℹ️ 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".

Comment thread src/domain/desktop/appExportPython.ts Resolved
cursoragent and others added 3 commits November 10, 2026 04:00
A file alias must stay a file. When its parent directory was not seeded,
the symlink was dangling and a write through it failed with ENOENT.
The Windows lane timed out in webModuleCli, which this diff does not touch,
and the rerun API is unavailable.
@N0zoM1z0 N0zoM1z0 changed the title fix(cli): record the caller HAR path in environment-build evidence fix(ci): restore main workflows and captured-state replay Nov 10, 2026

@gensokyo-dev gensokyo-dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Automated maintainer validation: reviewed the producer and all six resolved review findings; independently ran seven key files (187 passing tests). Strengthened the CLI refusal oracle to preserve the original error projection; 50 normal tests pass and a dropped-parent fault that previously falsely passed is now detected. Static checks passed. Current-head portable CI is green; Windows package validation is still running. This approval does not attest to human review.

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.

4 participants