Repository navigation
Code Analysis Go Concrete Methods
Validated in Draft, not Labs: #1264, head 3b2bdd1aec833f85c51aaf8c2d8c711fb7083c32, extends the six-language candidate #1263. It is position 4 in actual native stack #1262. Original authors, commits and PR ownership remain unchanged; the original Go/Rust stack #1257 remains separate. No approval, formal merge, release or installation.
Before, Cobra's doc/util.go:26 cmd.HasParent() stopped at method dispatch. Its parameter is explicitly *cobra.Command. After, the CLI follows the call to command.go:1393 HasParent, whose qualified definition is *Command.HasParent.
The reserved gRPC case follows internal/resolver/config_selector.go:142 state.Attributes.Value() into attributes/attributes.go:66. The receiver is explicitly *attributes.Attributes in resolver.State. This identifies the getter's body; it does not identify the runtime implementation of the stored ConfigSelector value.
A real Chi change replaces *Mux.Match's body with delegation to the new Find method. The candidate finds two source-verified concrete callers before the change and four after, where the baseline found none. Navigation is valid on both sides. The go.mod language version also changes, so the paired result remains partial, exit 1.
- Cobra
e392f3204db0445f1f4ad47448b04d8c8ad04c2a: explicit Command receiver, imported from the declared module. - Chi
67be7d9cafdaeb4e04e887ff78d09e030ee43b00 → 71307f9b7e4e9527638bc951c42b782cd1560331: concrete Mux calls and the changed Match method atmux.go:365. - gRPC
98a0092952dd4d8443229c3a335ec592d9c40c9b: field receiver to Attributes.Value, reserved after initial code and before its first candidate method capture, without tuning.
These repositories were previously exposed in the free-function study. They are not blind samples. Source answers and authored compiler controls preceded implementation; the supplemental Chi pair has its own exposure record.
| Three selected method targets and two interface controls | Correct | Wrong | Known misses | Reasonable unknowns |
|---|---|---|---|---|
| Preserved Go v1 baseline | 0 | 0 | 3 | 2 |
| Candidate source and extracted ZIP | 3 | 0 | 0 | 2 |
An independent, complete configured type graph agrees with all 9,281 newly emitted targets, with no disagreements, unavailable targets or compiler diagnostics. The broader denominator includes compiler-selected calls to uniquely located, body-bearing methods in captured project source:
| Project | Compiler-known calls | Candidate correct | Wrong | Known misses |
|---|---|---|---|---|
| Cobra | 789 | 789 | 0 | 0 |
| Chi | 459 | 456 | 0 | 3 |
| gRPC | 8,070 | 8,036 | 0 | 34 |
The baseline misses all 9,318 of these method targets. The candidate still misses 37, rather than counting them as reasonable unknowns. For example, Chi mux.go:82 rctx.Reset() follows a value obtained from the unloaded standard-library sync.Pool API and then a type assertion. Exact locations and source lines for all misses are retained in the report. Interfaces, external bodies and arbitrary function values are outside this denominator. This is not general all-call precision, runtime execution or complete impact.
All 64,930 call ranges, 15,174 previous targets, functions and imports are preserved. Fixed manifests, replay and full report · Complete compiler rows and known misses.
go-source-direct-v2, adapter revision 2, uses the existing checker plus go/types.Info.Selections. It supports captured concrete methods, including promotion, method expressions, aliases and generic instances when the compiler supplies the method object. Receiver identity distinguishes same-named methods on different types. Duplicate or invalid receiver ambiguity, interfaces, function fields or variables, absent bodies and uncaptured sources remain unresolved. Historical v1 captures retain their original free-function scope.
The normal product still reads one root module under its recorded SDK, build and test profile: Darwin/arm64, cgo disabled, no custom tags, tests included in these runs. External types are incomplete. The root go.mod language/toolchain directives are captured but not enforced by the partial checker. Workspaces, replace/vendor/nested-module assembly and generated compiler execution remain unsupported. Missing Go retains exit 2 with extract/go-unavailable and installation or ARCHIFY_GO guidance.
The large Chi TestMuxBasic question still reports 102 calls, 40 included and 62 omitted; the selected Get call is in raw facts but outside the displayed range. The limit was not increased to force a passing example. Shorter Chi, Cobra and gRPC questions have valid target navigation; the changed Match investigation has valid incoming references. Runtime identity, nil safety, argument applicability and complete compilation remain unproved.
python3 benchmarks/code-analysis-go-concrete-methods/run.py \
--cli archify/bin/archify.mjs --samples-root /fixed/samples --out /runs/sourceFor baseline use the #1263 CLI with --expect baseline. For ZIP use the extracted entrypoint. Both distributions produce three byte-identical raw-facts captures and five equivalent saved/paired questions after normalizing only install/output paths. Per distribution, three checks and four questions exit 0; the paired query stays partial and exits 1. Checks explicitly use --fail-on never, which does not mean no findings.
Package parity: two canonical Node 22.23.3 / zlib 1.3.1-e00f703 builds agree, as do all 168 tracked module files. ZIP SHA256: 3b4a72acbd534a494c09cc031a4b1b6d4a2dcd194b21658109e822b08bcfae3e.
The product remains standard-library-only Go 1.18+, with no new dependency or language-server process. The optional audit alone uses pinned x/tools 0.52 and Go 1.26+; Go 1.27.2 was already installed. It reads a full readonly dependency graph without executing project source or tests. Observed x/tools source cache: 12 MiB; fresh-cache setup cost was not controlled. Exact audit dependencies, commands, checksums and cache-dependent timings are retained. No audit dependency is shipped in the ZIP.
-
Local: full module suite 376/376, zero skips, at
3429fef63; later product edits clarify limitations. Final packaged Go/question/paired selection 37/37. Original Go source/ZIP regressions retain nine prior positives and seven GenMan references per side. The formerly scoped gRPC method unknown is now a source-known positive under v2. -
Remote: final-head CI completed success at
3b2bdd1aec833f85c51aaf8c2d8c711fb7083c32. The actual analysis log reports 376/376 passed, zero skips. Both regression shards, browser/WebM, ZIP, three-platform packages and Windows jobs passed; deployment jobs were skipped. This validates this Draft head, not Labs integration or runtime execution. - Integration: Draft only, not Labs, approved, merged, released or installed. No local Windows execution claim.
Next: investigate the 37 concrete source-known misses and deepen Rust source semantics. Keep interface dispatch and incomplete build evidence separate from definite method bodies.