Skip to content

perf(go): summarize build identity and query retained metadata - #5524

Merged
gensokyo-dev merged 4 commits into
mainfrom
perf/5499-go-metadata-views-20261020
Oct 20, 2026
Merged

gensokyo-dev merged 4 commits into
mainfrom
perf/5499-go-metadata-views-20261020

Conversation

@gensokyo-dev

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

Copy link
Copy Markdown
Collaborator

Summary

Fixes #5499. A Go compiler/main-module question currently receives raw encodings and every dependency. Add opt-in summary delivery and selected retained metadata views through the shared application/domain layer. Default complete replies and their Evidence identity remain unchanged.

Problem and expected behavior

GitHub CLI v2.102.0 produces 63,544 bytes of complete Go Evidence with 165 dependencies. A summary returns embedded identity, source ranges, counts and unknowns; dependency/settings pages select exact paths/keys, original indices and fields without reopening the target. Every row keeps its original index and parent identity. Complete bytes remain accessible in the retained parent or a CLI Evidence bundle.

Change and scope

The existing Go reader still owns all parsing. Shared views validate immutable parent facts once for their Evidence lifetime; mutable inputs are revalidated. CLI uses the existing non-overwriting bundle publisher; MCP retains the complete parent before projection. Scope decision: not applicable to this projection of existing read-only metadata.

Contract and boundary impact

  • Owner: Go domain facts and shared retained-view projection; no provider protocol or parser changes.
  • CLI/MCP: optional detail: summary; Go views support dependency/settings filtering, fields and paging. Default complete delivery stays compatible.
  • Evidence: unchanged complete parent; derived views carry identity, source ranges, coverage and explicit unknowns.
  • Target/authority: reads the selected stable file; CLI writes only the explicitly selected new Evidence output. Reader and publication keep their existing cleanup owners.
  • Packaging: no dependencies, installers, binaries or generated outputs committed. Catalogs are regenerated from contracts.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a target process.
  • Inject instrumentation or run target scripts/code.
  • Write a caller-selected new Evidence output file for CLI summary delivery.
  • Contact network services during inspection.
  • Recover protected code or work around protections.

Evidence and regression coverage

Native go version -m, original byte ranges and before/after full exports agree for all 165 dependencies. Real CLI complete output is identical; summary bundles retain it, and file-based selected CLI queries match the native oracle. Fixtures cover duplicate paths, empty selections, field omissions, identity conflicts, unavailable metadata, mutable/malformed parents and bounded messages.

In the pinned pre-rebase cohort, actual Codex 0.163.0 with a deterministic local SSE backend captures every request, including repeated catalogs. No AI inference or paid model service is used. Whole captured-request JSON token proxies:

Question Before → after
Compiler, main module and dependency count 158,529 → 123,368 (same two requests)
Identity plus one dependency 158,538 → 186,812 (two → three requests)
Same compound question plus export 256,342 → 250,352 (three → four requests)

Summary helps questions it directly answers; a follow-up round can cost more context. Repeated direct-SDK compound/export tasks also get slower: 4.855–4.952 → 6.370–6.564 s wall, 4.682–4.725 → 6.175–6.400 s CPU, 671–680 → 846–869 MiB family peak. Small tasks remain about 4.3 s; warm selected reads take 33 ms. No universal speed/memory gain or actual model usage is claimed. Methods, complete measurements and reproduction.

  • Observations, derivations and inferences remain distinguishable.
  • Artifact identity, provenance and failed attempts are preserved.
  • Missing metadata, partial parsing and runtime dependency completeness remain explicit.

Validation performed

Current head is rebased onto main@cf5194f68, retaining its new IL2CPP contract and the Go additions. All 258 focused tests in 12 files pass, including the 32 IL2CPP view tests and 13 CLI path tests. Full npm run check, npm run docs:check plus five README tests, and a rebuilt-runtime real SDK selected query/full export pass. The original complete parent identity and all 165 dependencies remain exact. Duplication passes at 3.49018% (baseline 3.49743%, gate 3.5%). The frozen timing cohorts below are not timings of this rebase.

After rebasing onto main@c374c2fe7: 10 files / 202 focused tests pass; npm run check and npm run docs:check pass (including five README consistency tests). A real rebuilt-runtime SDK selected query and complete export pass again with the original parent identity and all 165 dependencies. Eight frozen matched SDK tasks plus a warm diagnostic, six actual-client task variants, and real CLI complete/summary/bundle/file-view verification also pass. All qualified payload exits and owned cleanup are verified, with zero observed OOM events. Two qualification attempts stopped at the host-memory guard, including a latest-main build; owned scopes were verified inactive and unchanged-guard retries passed after headroom recovered. Final whole-scope counters are unavailable.

Review qualification: the shared benchmark finalizer now cleans owned resources before optional transcript publication. All 11 receipt-failure tests pass; a real selected SDK task/export passes, and an injected transcript-write failure exits 1 with a recorded failure and verified process-family cleanup.

Architecture review: Go domain now owns the existing report-to-subject architecture mapping. Production Evidence and every Go view share it, rejecting inconsistent inline/file parents, including conflicts between known and unknown architectures. All 213 focused tests and full npm run check pass after this correction.

The initial path-message/duplication failures disappeared on new main. Current CI shard 4 has four filteredFailureOutput.test.ts assertions expecting the old generic remediation text; all four reproduce on untouched main@cf5194f68 (npm run test:focused -- tests/boundary/cli/filteredFailureOutput.test.ts: 4 failed, 1 passed). Actual output uses the contract-aware recovery guidance added by main. The Go PR does not change that workflow. The control run used the pinned toolchain, bounded resources, verified cleanup and zero observed OOM events. Runtime/platform checks, including the Windows lane, passed. Matrix fail-fast cancelled shards 3 and 5; a direct shard-3 rerun was cancelled again because the original shard-4 failure remains. Their complete CI coverage is unverified; changed Go/Rust/CLI/MCP paths are covered by the 258 focused local tests and real SDK/CLI tasks. The owner explicitly authorized bypass for a verified PR blocked by unrelated CI; the bypass is for this reproduced baseline failure and its resulting aggregates/cancellations.

Compatibility, safety, and release

No default reply or complete Evidence identity change. Real verification covers Linux ELF; PE/Mach-O use authored fixtures. Metadata observes embedded claims and does not authenticate a compiler or establish complete runtime dependencies. Actual model reasoning, backend schema acceptance, rendering and billing are unmeasured. REA never executes an input. The installed Go tool is also invoked as the trusted native verifier.

Author readiness

Human owner: @gensokyo-dev

The owner explicitly dictated these declarations and initial readiness in the working session; the assistant entered them under that instruction.

  • 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; no additional maintainer scope decision is required.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked.
  • Tests cover changed behavior and meaningful failure paths.
  • Owning docs, contracts and generated metadata are updated where needed.
  • Representative CLI/MCP output and measured limits are documented.
  • The final diff has been checked for secrets, unrelated cleanup and unsupported claims.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 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-20T14:15:08.727748Z 99003cf 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 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The PR appears safe to merge; no blocking issues remain from this review.

Summary

Adds optional Go build summaries and selected dependency/settings pages while preserving complete Evidence.

  • Go inspections can return a short summary with selectable metadata.
  • CLI summaries return a compact result and save the full Evidence bundle.
  • Go metadata experiments record query and request costs.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Inspect Go binary] --> B[Create complete Evidence]
  B --> C{Requested detail}
  C -->|complete| D[Return complete Evidence]
  C -->|summary| E[Retain complete parent]
  E --> F[Return summary and parent ID]
  E --> G[Select retained Go metadata]
  G --> H[Filter fields and page original rows]
Loading

Reviews (5) · Last reviewed commit: "docs(experiments): record latest-main Go..." · Reviewed by Greptile

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

ℹ️ 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/analysisView/goBinaryView.ts Resolved
@gensokyo-dev
gensokyo-dev force-pushed the perf/5499-go-metadata-views-20261020 branch from d67ebf9 to 20eea6c Compare October 20, 2026 14:04
@gensokyo-dev
gensokyo-dev force-pushed the perf/5499-go-metadata-views-20261020 branch from 20eea6c to 99003cf Compare October 20, 2026 14:12
@gensokyo-dev
gensokyo-dev merged commit c2858d2 into main Oct 20, 2026
77 of 88 checks passed
@gensokyo-dev
gensokyo-dev deleted the perf/5499-go-metadata-views-20261020 branch October 20, 2026 15:09
@github-actions github-actions Bot mentioned this pull request Oct 20, 2026
3 tasks done
kangyishuai pushed a commit to kangyishuai/rea that referenced this pull request Oct 20, 2026
…ansition-view

Resolve the description conflicts with main's Go build metadata view
(morluto#5524). The inspect_analysis_view and inspect-analysis-view descriptions
keep main's text and add this branch's browser scenario additions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@morluto morluto added the performance Performance regressions, scaling limits, and bounded-resource work label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Performance regressions, scaling limits, and bounded-resource work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Query retained Go build metadata without full raw replies

2 participants