Skip to content

feat(cli): report version and runtime with an explicit output format - #6530

Merged
gensokyo-dev merged 190 commits into
morluto:mainfrom
mhamzasakhi:feat/version-json
Oct 23, 2026
Merged

gensokyo-dev merged 190 commits into
morluto:mainfrom
mhamzasakhi:feat/version-json

Conversation

@mhamzasakhi

@mhamzasakhi mhamzasakhi commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #5483. rea --version --json or an explicit --format returns package version, runtime identity/support, platform and architecture. Plain --version keeps its existing output; help and other output controls retain their documented handling.

The launcher now handles formatted versions before loading analysis commands. Global setting validation has one lightweight owner shared by the launcher and compiled CLI drivers; mcp doctor and version reports share document rendering. No target interaction, provider prerequisite, new MCP tool, or additional runtime bundle entry is introduced.

Validation

Linux x64, pinned Node 24.22.1 / npm 11.16.0:

  • 231 tests passed across 12 selected files, including public CLI, dispatcher cleanup, runtime bundles, real MCP doctor catalogs, doctor composition and compiled CLI drivers.
  • npm run check and npm run docs:check passed (including 9 README consistency tests).
  • A blocked-analysis-import regression passes with this dispatcher and fails with the original dispatcher. Real PTY JSON matches piped facts. A real Node 20 probe reports supported_runtime: false; this is not Node 20 analysis support.
  • Three alternating pairs of equivalent completed version requests: median elapsed 1.716 → 0.203 s, wait-accounted CPU 1.968 → 0.198 s, sampled family RSS 335.6 → 72.1 MiB. All 207 output bytes remain identical. Plain-version and filtered-providers controls also preserve exact output; no token reduction or general analysis speedup is claimed.

Executed methods, source/build identities, measurements and limitations.

One earlier parallel selection had 209 passes and one existing 3000 ms process deadline failure. The later serial 231-test selection passed without changing deadlines; the failed attempt is retained and its cause is not conclusively attributed. Bun, macOS and Windows end-to-end behavior was not run.

Hosted CI completed with 9 demonstrated baseline-only failing cases, all reproduced on its exact main parent and merge revision. Complete attribution and correction. Fail-fast cancellations and aggregate failures leave incomplete broad-suite coverage; this is not a green-CI claim. Four Greptile findings target unchanged baseline blobs and remain open, while Codex completed current-head review without findings. Merge used the explicit baseline-failure bypass authorization; no unrelated repair is included.

Author readiness

Human owner: @mhamzasakhi

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

mhamzasakhi and others added 2 commits October 23, 2026 12:57
`rea --version --json` and `--version --format <format>` ignored the format
and printed only the bare version, so support reports gathered the runtime
and platform by hand.

A root --version request that selects a format now renders a documented
report: package name and version, JavaScript runtime and version, platform,
architecture, and whether the runtime satisfies the supported range. It
contains no paths, environment values, user or host names, and starts no
provider. Plain --version is unchanged, --help keeps precedence, and other
output controls keep Incur's plain version.

The runtime verdict uses a new shared supportsJavaScriptRuntime rule that
rea doctor now uses too, so both judge Bun by its Node.js compatibility
version. mcp doctor's private JSON/format renderer moves to cliOutput as
renderCliDocument and is shared with the version report.

Closes morluto#5483
Carry caller messages through the existing schema issue owner instead of constructing and discarding an intermediate input error. Remove forwarding schema helpers and migrate equivalent constructors across investigation, firmware, dylib, process, and screenshot workflows while preserving diagnostic paths and causes.
@mhamzasakhi
mhamzasakhi marked this pull request as ready for review October 23, 2026 08:04
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 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-23T15:47:59.527471Z 721f579 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.

* docs(readme): add Roman Urdu edition

Register ur-Latn with a pending website catalog and preserve English command examples.

Script-tag handling follows morluto's shared helper proposed in PR morluto#2043 (c46f606).

* test(website): cover completed script-tag page metadata
@greptile-apps

greptile-apps Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 2/5 Tier: apex

[High impact] The PR reaches many analysis workflows and changes the public package-release path.

The PR should not merge until ELF parsing work is bounded and repeated-slash item calls can find their stored entities.

Findings

  1. P1 Security ELF inspection can freeze ▶
  2. P1 Repeated slashes hide existing items ▶
  3. P2 Unchanged IDs appear changed ▶
  4. P2 Signature errors point elsewhere ▶
Fix with agent prompt
### Issue 1
src/native/exports/NativeExportParser.ts:384-397
The new ELF version walk checks byte ranges but has no total work limit. Records can share auxiliary rows: a roughly 2 MiB table can trigger 4,294,901,760 inner-loop visits while passing the range and forward-offset checks. `NativeExportsProvider` runs this synchronously, so a crafted file can freeze the CLI or MCP server and block cancellation. Add a shared work budget or reject overlapping chains in both version-table walks.

**How this was verified:** A caller-selected ELF reaches a synchronous walk that can repeatedly revisit shared rows while every checked byte range remains inside the file.

### Issue 2
src/domain/analysisView/environmentStateRules.ts:210-215
`segmentsOf` now preserves internal empty segments, but `callSegments` still drops them. For a captured item route such as `/api//books/1`, extraction stores the entity under `/api//books`, while its tool call searches with `["api", "books"]`. `collectionMatch` rejects that mismatch, and `answerItem` reports the existing entity as missing. Make capture-time and call-time path splitting preserve the same segments, and cover a served item call rather than only extracted type names.

### Issue 3
src/application/environment/environmentCompareDiff.ts:260-267
ID-list mapping now happens only in `sameItems`. When one item changes or the list length differs, that check fails and `array` compares individual values without their field name. `scalar` then skips the ID mapping. For example, with `101 → 1` and `102 → 2`, comparing `{"ids":[101,102]}` with `{"ids":[1,9]}` wrongly reports a difference at `/ids/0` as well as the real change at `/ids/1`. Carry the ID-list context into the element comparisons so unchanged IDs stay matched.

### Issue 4
src/dotnet/ManagedMemberInspectorCore.ts:947-948
New invalid type-operand issues copy a blob-relative offset directly into `coverage.issues`. For the added field-signature fixture `[0x06, 0x12, 0x07]`, the reported offset is `2`, not the operand’s position in the selected PE file. `readMetadataBlob` returns a slice, so the file position is available from its byte offset. Add that base when publishing these issues, as `validateLocalSignature` already does, so users can locate the bad byte.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Adds explicit-format version reports and avoids loading analysis commands for those reports. The full diff also changes environment serving and comparison, binary/archive readers, release publication, and translations.

  • Formatted version requests show the package and runtime details.
  • The release workflow checks the published package before MCP publication.
  • A GitHub Actions workflow saves CLI analysis output for later review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[CLI arguments] --> B[Normalize arguments and check settings]
  B --> C{Explicit-format version request?}
  C -->|Yes| D[Build package and runtime report]
  D --> E[Shared document formatter]
  E --> F[stdout]
  C -->|No| G[Load CLI commands]
  G --> H[Run Incur]
  H --> F
Loading

Reviews (3) · Last reviewed commit: "perf(cli): avoid loading analysis comman..." · Reviewed by Greptile

Comment thread docs/cli.md Resolved

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

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

mhamzasakhi and others added 21 commits October 23, 2026 13:14
The CLI test rejected any report containing the OS account name, so an
account named node, linux or rea failed a correct report. Check unique
caller-controlled HOME, cwd and environment markers instead; the strict
schema still rejects any additional field.

The CLI guide said --version with other output controls prints the plain
version, but invalid combinations such as --json with --token-limit report
their existing output-flag error first. Describe both outcomes and test them.
Centralize parse-wide identity and coverage facts while keeping conservative admission values separate from measured rows and counters. Reuse the derived truncation reason and retain the final serialization bound.

Tighten the report-budget regression so unexpected parser finalization errors cannot be swallowed by its budget search.
Share expected and observed check construction across MZ, COM, and raw-binary attestations. Preserve format-specific rules and source coordinates, and derive mapping callback types from the recording owner.
Parse complete nonzero Activity Manager reports while preserving other command failures and their captured output. Admit dollar signs only in the activity component name for nested Android classes.

Fixes morluto#6528

Fixes morluto#6527
Project PYZ namespace packages as metadata so their query paths do not claim output directories. This lets independent CArchive files retain the same logical path and remain inspectable and extractable.

Fixes morluto#6539

@baron baron 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.

AI-assisted review traced fixed version-report fields, root-flag/format precedence, launcher admission, shared doctor rendering and resolved marker/fallback findings. No blocking feature defect found. Exact-head build, 50 selected source/dispatcher cases and the compiled public version-report test passed locally; this includes privacy markers, YAML/plain-version behavior and filter/help precedence. Filtered-out tests are not counted as executed.

I requested one rerun of hosted CI 39923240735. Its original Hopper process-lifecycle and firmware-fixture failures are retained and not proven transient/baseline. Approval remains withheld pending completed required hosted gates. No real Bun or real-TTY end-to-end coverage, full-suite local pass or new provider behavior is claimed.

morluto and others added 19 commits October 23, 2026 22:18
Share bounded ELF section-name decoding across native and note readers; retain read-only ranges and coverage reasons when names are unknown. Preserve ELF symbol-version bytes, dyld-bound method uncertainty, partial gRPC-Web trailers, and per-parent model identity checks. Compare GPU signatures as bytes and require a PTX module header. Share selected-path errno classification across EVM and BEAM.

Validation: 397 shared-parser tests passed (one existing skip), 5 MCP schema tests passed, 14 EVM error-mapping tests passed, and 23 protobuf CLI/MCP matrix cases passed across focused runs. Build, typecheck/lint, docs, formatting, and 2134-file discovery passed. Full EVM provider workflow remains locally unverified on Darwin arm64; format controls are synthetic.

Fixes morluto#6738
Fixes morluto#6737
Fixes morluto#6745
Fixes morluto#6740
Fixes morluto#6749
Fixes morluto#6747
Fixes morluto#6739
…orluto#6401)

* fix(setup): keep the CLI-only skill choice offered under a client ID

* test(setup): cover the accept-all CLI-only skill selection
…al (morluto#6479)

* fix(apple): report a read-denied selected archive as host access denial

inspect-keyed-archive reported a host read refusal on the caller-selected bundle entry as artifact_operation_failed/execution_failure with reason io, leaving EACCES or EPERM only inside message text. The caller selected that entry, so the refusal is a selection outcome with its own typed classification, system code and read-access recovery.

DirectoryArtifactReader now marks a refused entry open with DirectoryArtifactEntryAccessDenied, which retains the host system code and the selected entry path. KeyedArchiveReader, which owns the caller's selection, maps it to the shared AnalysisAccessDeniedError, and artifact failure translation keeps that typed error instead of replacing it with a generic io failure. Other readers and other reader failures are unchanged; every existing reason keeps its current projection.

Adds the access_denied projection coverage plus a real host refusal through the production reader and a non-permission control.

* fix(apple): carry cleanup ownership and cover raw refusals for a denied selection

Addresses the two review findings on the denied-selection classification:

- The typed host access denial now carries the reader's cleanup observation, so a denied open that left a resource owned does not project as fully cleaned.
- Adds coverage that starts from raw host EACCES/EPERM/EIO refusals with the real DirectoryArtifactReader open path, so the marker itself is exercised rather than constructed by the test. EIO stays an artifact failure.
…ates (morluto#6253)

* fix(doctor): check only the current platform's Hopper launcher candidates

Doctor built one launcher list for every platform, so on macOS it could
report a Linux-only path as a healthy Hopper ahead of a renamed bundle,
and setup then registered that path. Give per-platform automatic
candidates one owner that runtime configuration and doctor both read,
scan renamed macOS bundles and probe the Homebrew cask only on macOS,
and share runtime's renamed-bundle scan with the doctor host.

Fixes morluto#6228

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(doctor): keep the renamed Hopper bundle scan asynchronous

Sharing runtime's synchronous scan made the doctor host read
~/Applications with readdirSync, which blocks the event loop on a slow
or network-mounted home. Give MacHopperPaths an asynchronous scan for
doctor beside runtime's lazy synchronous one, sharing the directory
filter and candidate builder, and check that both return the same
candidates.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(doctor): model renamed launchers with runtime's POSIX joins

Since morluto#5235, runtime builds macOS launcher paths with posix.join, so on
Windows the discovery table's native-join renamed launcher no longer
matched runtime's candidate. Model launchers with posix.join and keep
filesystem setup native, as MacHopperPaths.test.ts does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
…uto#6327)

A projection wider than SQLite's native result-column limit failed with the
generic "too many columns in result set" SQL error. The inspector could not
attribute that error to a generated column, so the worker reported "format"
and the parent blamed the caller's path as invalid_format even though the
selected database was readable.

Classify the refusal from SQLite's own column limit for the private
connection, carry the selected and engine counts through the worker reply,
and project it as a capacity resource constraint. The database stays
readable, no partial rows are returned, and the recovery names the column
counts and splitting the projection across calls.
…ut (morluto#6313)

* fix(web): refuse an existing script-export destination as invalid input

export_web_scripts refused an existing output directory or link correctly,
but reported it as artifact_operation_failed / execution_failure with no
field issue or recovery. SafeOutputTree.create raises that refusal as a
path failure before any output tree exists, and the export mapper wrapped
it as an artifact failure.

Attribute pre-admission path refusals to output_directory as an
AnalysisInputError, as environment export already does for its directory.
Both now share one helper owned beside SafeOutputTree; failures after the
tree is admitted keep their artifact semantics.

Fixes morluto#6029

* fix(artifacts): type SafeOutputTree destination refusals

Admission conversion treated any cleanup-free path failure raised before
admission as a refusal of the selected directory, so an acquired-tree setup
failure, such as being unable to restrict a created root to 0700, blamed
valid output_directory or directory input.

SafeOutputTree.create now raises SafeOutputTreeDestinationRefusal for the
refusals of the selection itself: a relative or reserved root, an existing
root, and an accepted existing root that is not an empty directory. The shared
conversion accepts only that type, directly or wrapped by
SafeOutputTreeCreationFailure, so script and environment export no longer
track admission separately.
…o#6230)

* fix(evm): reject repeated container keys in Solidity metadata

* test(evm): check the repeat-key diagnostic for deeply nested keys
* docs(ci): add a repeatable static analysis example

* fix(ci): isolate example reports and repair the guide link

---------

Co-authored-by: gongfpp <[email protected]>
Retain bounded FAT and offset-tagged PE observations through archive hashing,
classification, and content nodes. Preserve PyInstaller member paths according
to the observed carrier dialect and share APK v1 signing-name semantics.

Read SQLite's implicit sqlite_schema table without inventing a stored schema
declaration. Distinguish unsupported ELF numbering and decoded-name admission
from malformed data and fixed scan allowances. Preserve Sigrok basenames and
classify matching explicit input-format refusals at their owning boundary.

Validation: 554 distinct tests passed, 3 skipped across serial focused runs;
build, typecheck/lint, docs, formatting, and discovery (2141 files) passed.
Sigrok command-boundary simulators do not establish real-tool decoding.
Small repeated public PyInstaller CLI runs had equivalent inventory facts;
warm median elapsed 0.5431s before / 0.5426s after, with no speed claim.

Fixes morluto#6733
Fixes morluto#6741
Fixes morluto#6722
Fixes morluto#6732
Fixes morluto#6736
Fixes morluto#6734
Fixes morluto#6764
Fixes morluto#6766
Refs morluto#6739
Use zip.js's parsed symlink fact for inventory and open refusal. Treat an
unmatched Godot trailer as an unconfirmed candidate while preserving failures
for confirmed malformed packs. Report entropy path-resolution failures at the
selected-input boundary.

Separate Go header discovery from inline string extents in ELF and Mach-O,
and apply the aggregate content allowance after validating real source ranges.
Normalize binary plist UID widths through the existing scalar-copy owner,
budget exact clone growth, preserve source identity, and refuse inexact UIDs.

Validation: 389 distinct tests passed, one Linux /proc test skipped on Darwin;
build, typecheck/lint, docs, single-thread formatting, and discovery (2142 files)
passed. CLI/MCP Go fixtures and public ZIP/Godot/keyed-archive workflows ran.
Real producer prevalence and external provider execution were not established.

Repeated ordinary keyed-archive CLI inventory facts and estimated reply tokens
were equal before/after. Warm median elapsed was 0.5166s / 0.5177s; no speed claim.

Fixes morluto#6751
Fixes morluto#6763
Fixes morluto#6754
Fixes morluto#6767
Fixes morluto#6762
Fixes morluto#6779
@gensokyo-dev

Copy link
Copy Markdown
Collaborator

CI source-test failures are baseline failures, verified against the exact revisions used by the failed job.

  • CI main parent: 567b55947486516b9d35d30b7202ac69c6f40f6d.
  • CI merge: 9747438e8957995767da400ebc0ae9b727fe98f4 (PR head 721f579).
  • I executed the four affected source files in separate checkouts with Node 24.22.1/npm 11.16.0, one worker, and identical manifests/dependencies (package-lock.json SHA-256 86f37ff8c5ab3c2edd8376d2d8e2d8a67b805e740111b9e873bef3ea40dc83c1). Both produced 4 failed / 56 passed. Their normalized failure diagnostics are identical; neither run hit the resource guard.

The same failures are:

  1. environmentBundle.test.ts: state catalog/discovery serialization reservation.
  2. environmentReplayCapacity.test.ts: late query/path match reports exact: false.
  3. sourceToBundleComparison.test.ts: sourceRoot webpack:// resolves as a directory.
  4. IdaNativeProtocol.test.ts: literal sigma matching also returns final sigma.

The PR changes none of these owners/tests. No unrelated fix is included. These four baseline failures are eligible for the explicitly authorized bypass; other CI failures and current-head review findings still require attribution before merge.

Comment on lines +384 to +397
let auxiliary = offset + auxiliaryOffset;
for (let item = 0; item < auxiliaryCount; item++) {
if (auxiliary + 16 > table.size)
throw new BinaryFormatFailure(
"malformed",
"Version requirement auxiliary chain leaves its section",
);
const auxAt = table.offset + auxiliary;
const versionIndex = reader.u16(auxAt + 6) & 0x7fff;
const auxiliaryNext = reader.u32(auxAt + 12);
try {
addName(
versionIndex,
readElfStringBytes(names, reader.u32(auxAt + 8)),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 security ELF inspection can freeze

The new ELF version walk checks byte ranges but has no total work limit. Records can share auxiliary rows: a roughly 2 MiB table can trigger 4,294,901,760 inner-loop visits while passing the range and forward-offset checks. NativeExportsProvider runs this synchronously, so a crafted file can freeze the CLI or MCP server and block cancellation. Add a shared work budget or reject overlapping chains in both version-table walks.

How this was verified: A caller-selected ELF reaches a synchronous walk that can repeatedly revisit shared rows while every checked byte range remains inside the file.

Knowledge Base Used: Binary diagnostics and comparison

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/native/exports/NativeExportParser.ts
Line: 384-397

Comment:
**ELF inspection can freeze**

The new ELF version walk checks byte ranges but has no total work limit. Records can share auxiliary rows: a roughly 2 MiB table can trigger 4,294,901,760 inner-loop visits while passing the range and forward-offset checks. `NativeExportsProvider` runs this synchronously, so a crafted file can freeze the CLI or MCP server and block cancellation. Add a shared work budget or reject overlapping chains in both version-table walks.

**How this was verified:** A caller-selected ELF reaches a synchronous walk that can repeatedly revisit shared rows while every checked byte range remains inside the file.

**Knowledge Base Used:** [Binary diagnostics and comparison](https://app.greptile.com/pre/-/custom-context/knowledge-base/morluto/rea/-/docs/binary-diagnostics-and-comparison.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment on lines +210 to +215
export const segmentsOf = (path: string): string[] => {
const segments = path.split("/");
if (segments[0] === "") segments.shift();
if (segments.at(-1) === "") segments.pop();
return segments;
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Repeated slashes hide existing items

segmentsOf now preserves internal empty segments, but callSegments still drops them. For a captured item route such as /api//books/1, extraction stores the entity under /api//books, while its tool call searches with ["api", "books"]. collectionMatch rejects that mismatch, and answerItem reports the existing entity as missing. Make capture-time and call-time path splitting preserve the same segments, and cover a served item call rather than only extracted type names.

Knowledge Base Used: Environment bundle and replay

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/domain/analysisView/environmentStateRules.ts
Line: 210-215

Comment:
**Repeated slashes hide existing items**

`segmentsOf` now preserves internal empty segments, but `callSegments` still drops them. For a captured item route such as `/api//books/1`, extraction stores the entity under `/api//books`, while its tool call searches with `["api", "books"]`. `collectionMatch` rejects that mismatch, and `answerItem` reports the existing entity as missing. Make capture-time and call-time path splitting preserve the same segments, and cover a served item call rather than only extracted type names.

**Knowledge Base Used:** [Environment bundle and replay](https://app.greptile.com/pre/-/custom-context/knowledge-base/morluto/rea/-/docs/environment-bundle-and-replay.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment on lines +260 to +267
const mapped = live.map((item) => {
if (
(typeof item === "string" && this.map.isStateReference(item, field)) ||
((typeof item === "number" || typeof item === "string") &&
ID_LIST_FIELD.test(field))
)
return translateValue(item, this.map);
return item;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Unchanged IDs appear changed

ID-list mapping now happens only in sameItems. When one item changes or the list length differs, that check fails and array compares individual values without their field name. scalar then skips the ID mapping. For example, with 101 → 1 and 102 → 2, comparing {"ids":[101,102]} with {"ids":[1,9]} wrongly reports a difference at /ids/0 as well as the real change at /ids/1. Carry the ID-list context into the element comparisons so unchanged IDs stay matched.

Knowledge Base Used: Environment bundle and replay

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/application/environment/environmentCompareDiff.ts
Line: 260-267

Comment:
**Unchanged IDs appear changed**

ID-list mapping now happens only in `sameItems`. When one item changes or the list length differs, that check fails and `array` compares individual values without their field name. `scalar` then skips the ID mapping. For example, with `101 → 1` and `102 → 2`, comparing `{"ids":[101,102]}` with `{"ids":[1,9]}` wrongly reports a difference at `/ids/0` as well as the real change at `/ids/1`. Carry the ID-list context into the element comparisons so unchanged IDs stay matched.

**Knowledge Base Used:** [Environment bundle and replay](https://app.greptile.com/pre/-/custom-context/knowledge-base/morluto/rea/-/docs/environment-bundle-and-replay.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment on lines +947 to +948
if (cause.issue.code === "invalid-row")
issueSink?.({ ...cause.issue, scope });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Signature errors point elsewhere

New invalid type-operand issues copy a blob-relative offset directly into coverage.issues. For the added field-signature fixture [0x06, 0x12, 0x07], the reported offset is 2, not the operand’s position in the selected PE file. readMetadataBlob returns a slice, so the file position is available from its byte offset. Add that base when publishing these issues, as validateLocalSignature already does, so users can locate the bad byte.

Knowledge Base Used: Binary diagnostics and comparison

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/dotnet/ManagedMemberInspectorCore.ts
Line: 947-948

Comment:
**Signature errors point elsewhere**

New invalid type-operand issues copy a blob-relative offset directly into `coverage.issues`. For the added field-signature fixture `[0x06, 0x12, 0x07]`, the reported offset is `2`, not the operand’s position in the selected PE file. `readMetadataBlob` returns a slice, so the file position is available from its byte offset. Add that base when publishing these issues, as `validateLocalSignature` already does, so users can locate the bad byte.

**Knowledge Base Used:** [Binary diagnostics and comparison](https://app.greptile.com/pre/-/custom-context/knowledge-base/morluto/rea/-/docs/binary-diagnostics-and-comparison.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@gensokyo-dev

Copy link
Copy Markdown
Collaborator

Additional CI/review attribution for head 721f579:

  • Shard 5 failed the require.resolve does not execute loader-owner cases through CLI and stdio MCP. After separately building exact CI main 567b559 and merge 9747438, both reproduced 2 failed / 80 skipped for that selected case. Skips are not counted as executed tests. Neither run hit its resource guard.
  • The four Greptile findings are also baseline-only for this PR. NativeExportParser.ts, environmentStateRules.ts, environmentCompareDiff.ts, and ManagedMemberInspectorCore.ts have byte-identical Git blobs on the CI main parent and merge. This PR changes none of those owners. This attribution does not dismiss the underlying reports or claim to fix them; the threads remain open.
  • Codex completed review of 721f579 without findings. The earlier four source-test failures are independently attributed above.

The authorized bypass covers these demonstrated baseline failures and their fail-fast cancellations/aggregate status consequences. No unrelated repair is included in the version-report feature.

@gensokyo-dev
gensokyo-dev merged commit 169512a into morluto:main Oct 23, 2026
43 of 53 checks passed
@gensokyo-dev

Copy link
Copy Markdown
Collaborator

Correction to the CI accounting: the merged portable report contains 9 failing cases, not the 6 listed in my earlier attribution comments. Three failures had been emitted by shards that were later cancelled; I initially missed those before sending the merge request.

I have now executed the additional cases against separately built CI main 567b559 and CI merge 9747438, using the same locked dependencies and pinned toolchain. Both return 3 failed / 75 skipped:

  • peCertificatesCli: TeletexString-name rejection.
  • javascriptLiteralLoaderOwnership: resolve-only through stdio MCP.
  • javascriptLiteralLoaderOwnership: createRequire-base through stdio MCP.

The same assertion failures occur in both revisions; no resource guard was reached. Together with the earlier controls, all 9 observed failures are demonstrated baseline failures. No unrelated source repair is included. The six fail-fast cancellations still leave incomplete broad-suite coverage; this is not a green-CI claim.

PR #6530 merged as 169512a35bb015ff209168fb8bc1c9b31a2c678b under the explicit baseline-failure bypass authorization. Future merge audits will inspect all failures in the merged test report, including results from cancelled shards, before issuing the merge.

@morluto morluto added area: cli CLI adapter and one-shot commands enhancement New feature or request labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli CLI adapter and one-shot commands enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Provide machine-readable version and runtime information