Skip to content

test(ci): make the Windows path guard fixture polyglot so CI indexes Go end to end - #1961

Merged
DeusData merged 2 commits into
DeusData:mainfrom
ilyabrykau-orca:test/windows-guards-go-fixture
Sep 1, 2026
Merged

test(ci): make the Windows path guard fixture polyglot so CI indexes Go end to end#1961
DeusData merged 2 commits into
DeusData:mainfrom
ilyabrykau-orca:test/windows-guards-go-fixture

Conversation

@ilyabrykau-orca

Copy link
Copy Markdown
Contributor

Summary

The only CI venue that drives a repository through the shipped binary end to end (MCP stdio → supervisor → pipeline → SQLite) is the Windows guards harness — and every fixture it indexed was TypeScript-only. The Go/cgo extraction defect family (#1932: build-tag twins #1911, struct fields #1935, cgo #1929, channels #1930, cross-language bleed #1928) was invisible to that venue by construction.

This PR makes the test_non_ascii_path.py fixture polyglot. A small dummy Go package (written for this purpose, no real-world code) covers exactly the shapes that were broken:

  • a struct with fields and a method (Store, Push, NewStore)
  • a //go:build linux / //go:build windows twin pair sharing one function name (FlushDisk)
  • a cgo file: C preamble in the magic comment, a C.announce() call, an //export FixtureReady directive
  • a channel producer/consumer pair (events <- "tick" / <-events)

The harness now also counts Go-file definitions per variant (MATCH (n:Function|Method) WHERE n.file_path CONTAINS '.go'), requires at least one in the ASCII baseline, and includes the count in the cross-variant equality check. Go qualified names embed the containing directory (cbm_lang_module_is_dir), so non-ASCII repository paths flow into the Go passes on their own route — which this guard was previously proving nothing about.

RED / GREEN

  • RED: on the pre-change fixture the new baseline gate computes go_definition_nodes = 0 and exits with the setup-fail contract — the assertion is live, not vacuous. Equivalently: with the fixture but without Go extraction, the guard cannot pass.
  • GREEN (measured with the harness functions against a current binary, macOS): baseline nodes=28 edges=46 definitions=12 go=7, byte-identical Latin-1 (café_repo) and Cyrillic (проект_repo) variants match exactly.

go=7 is itself informative: the fixture's build-tag twin pair yields only one FlushDisk today because the twin collision on main is deterministic — when the τ-suffix fix (#1946, #1911) lands, this guard will observe the second twin appear as an equality-preserved count change.

Stacked on #1958 (the setup-retry/stats-source fix); only the last commit is new here.

Fixes #1959.

…ojects stats

The guards read node/edge counts exclusively from list_projects, but that
tool publishes its stats columns asynchronously — on some venues never
within a one-shot MCP session. index_repository's own response carries the
synchronous, authoritative counts, so a healthy index was misread as
'SETUP FAIL: ASCII baseline did not index ... nodes: None' (issue DeusData#1952
carries five such runs; reproduced deterministically on macOS where
list_projects returns the project row with no stats fields at all while
the index response reports nodes=12/edges=21 and definition queries work).

- test_non_ascii_path: take counts from the index_repository summary;
  keep list_projects only as a polled fallback (wait_projects_with_stats
  in mcp_stdio) and for the no-project diagnostics, now in a helper.
- Retry setup steps once (fresh cache) before declaring a precondition
  skip: the ASCII baseline, the CLI ASCII control (test_cli_non_ascii_arg),
  the hook-augment index and its permanent-daemon start — these are setup,
  not the surfaces under test, and a cold runner's daemon startup latency
  must not red the job through the all-skip gate.

Signed-off-by: Ilya Brykau <ilya.brykau@orca.security>
…Go end to end

The only CI venue that drives a repository through the shipped binary
(MCP stdio -> supervisor -> pipeline -> SQLite) is the Windows guards
harness, and every fixture it indexed was TypeScript-only. The Go/cgo
extraction defect family (DeusData#1932: build-tag twins DeusData#1911, struct fields
DeusData#1935, cgo DeusData#1929, channels DeusData#1930, cross-language bleed DeusData#1928) was
invisible to that venue by construction.

Add a dummy Go package to the test_non_ascii_path fixture covering those
shapes: a struct with fields and a method, a //go:build linux/windows
twin pair sharing one function name, a cgo file (C preamble, C. call,
//export directive), and a channel producer/consumer pair. Count Go-file
definitions per variant (Function/Method where file_path CONTAINS '.go'),
require at least one in the ASCII baseline, and include the count in the
cross-variant equality check - Go qualified names embed the containing
directory, so non-ASCII paths reach the Go passes on their own route.

Measured with the harness functions against a current binary: baseline
nodes=28 edges=46 definitions=12 go=7, identical for the Latin-1 and
Cyrillic variants. The go=7 includes exactly one FlushDisk - the twin
collision on main is deterministic, and this guard will observe the
second twin appear when the build-tag fix lands.

Signed-off-by: Ilya Brykau <ilya.brykau@orca.security>
@github-actions

Copy link
Copy Markdown

Thanks for opening this — it has been seen, and it is queued.

This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence.

Current review status: working through a backlog. 0.9.1-rc.1 is out, so the release freeze that held reviews is over — but it left a large queue of open pull requests behind it, and we are reading through them oldest-first. The background is in discussion #1144.

What that means for this PR, concretely:

  • It will not be closed for inactivity. No stale bot touches pull requests here.
  • It may still sit a while before a human reads it. That is on us, not on you.
  • Older PRs are read first, so a recent one is not being skipped — it is behind a queue.

Things that will genuinely speed it up whenever review does happen:

  • Keep it rebased on main — the tree is moving quickly right now, and a conflicting branch cannot be reviewed as the diff you intended.
  • Get CI green, or say which failures you believe are pre-existing.
  • Keep the change to one claim. Bundled features and refactors get split before they get merged, which costs you a round trip.
  • Every commit needs a sign-off (git commit -s) — CI enforces DCO.

If this fixes a bug, a reproduction we can run is worth more than a description of the symptom.

Thanks for contributing, and sorry in advance for the wait.

@DeusData
DeusData merged commit 011087e into DeusData:main Sep 1, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI never indexes Go end to end: the only binary-level harness fixtures are TypeScript-only

2 participants