Skip to content

Golden master only snapshots the audit JSON -- DB (per-function archetypes, call graph), SARIF, SBOM, graph, GPU and LLM outputs are untested on the corpus #4109

Closed

Description

@squid-protocol

Problem

The golden master diffs exactly one output, <repo>_galaxy_audit.json. A crucible scan produces seven:

Output Corpus regression snapshot?
_galaxy_audit.json ✅ golden master
_galaxy_master.db ❌ (14 test files read it, none snapshots the crucible)
_galaxy_graph.sqlite ❌
_galaxy_sarif.json ❌
_galaxy_sbom.json ❌ (no test references it)
_galaxy_gpu.json ❌ (no test references it)
_galaxy_llm.md ❌

Much of the engine's output exists only outside the audit. Per-function data in the audit is limited to 11 fields (branches, ratio, lines, name, params, documented, public, LOC, reflection, impact). It has no function archetype, z-score, calls, call targets, fan-in/out, pagerank or token mass. The DB's function_data has ~120 columns per function (45,550 crucible functions, all with func_archetype), plus 2,506 edge_data rows and 30+ mainframe tables, none snapshotted.

Example blind spot: two functions in one file swapping archetypes leaves the per-file "Function Archetype Mix" unchanged, so golden shows nothing.

Proposal

Extend the golden store with sanitized, canonicalized snapshots of the other outputs. Reuse golden_store's split-directory layout (#3384) so they merge cleanly:

  • DB: a deterministic dump of function_data (incl. func_archetype, func_z_score, calls, fan-in/out), edge_data and repo_data, keyed by file path + function name + start line; drop volatile columns.
  • SARIF/SBOM: normalize (sort results, strip run timestamps/tool versions) and diff.
  • LLM brief: diff with volatile lines stripped (the brief is already designed to have no per-scan fields in section 0).
  • GPU JSON: probably exclude coordinates (they re-solve corpus-wide), keep node/edge identity and mass.

Budget: fixture size and bless time. Start with function_data + edge_data, which covers the biggest gap.

Found during #4100 (PR #4105).

Activity

  1. added
    data-integrity
    testing
    priority: high
    on Oct 2, 2026
  2. added a commit that references this issue on Oct 2, 2026
  3. added
    scope:infra
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    data-integritypriority: highscope:infratesting

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions