Skip to content

Dead per-file archetype fields: File Archetype / drift z / fingerprints are never computed but reported as measured #4106

Closed

Description

@squid-protocol

Problem

Five per-file archetype fields in the audit are placeholders that nothing computes any more, but they're reported as measured values. In the committed golden master they are constant across all 3,003 crucible code files:

Audit field Telemetry key Value everywhere
File Archetype local_archetype "N/A"
File Drift (Z-Score) local_drift 0.0
File Fingerprint local_fingerprint {}
Repository Drift (Z-Score) global_drift 0.0
Repository Fingerprint archetype_fingerprint {}

Why: #3061 moved file classification out of signal_processor.calculate_risk_vector into record_keeper (post-assembly). signal_processor still emits these as placeholders, with a comment saying record_keeper overwrites them. record_keeper only overwrites the label (tel["archetype"], shown under the legacy key "Repository Archetype"). It never computes the distance or fingerprint, and nothing applies SPECIFIC_FILE_INFERENCE_MODEL (the per-language models for python/js/ts/c/cpp) at all.

Also: the general file archetype is reported under the key "Repository Archetype", but it's a file-level label (k=18, file_cluster_N).

Why it matters

A 0.0 drift z-score reads as "textbook fit", and the LLM brief and DB carry the same placeholders (llm_recorder global_drift/local_drift/local_archetype; DB columns of the same names). Golden can't catch a regression in a field that can't move.

Options

  1. Compute them: distance + fingerprint in record_keeper._classify_file_archetype, and apply the per-language model (or retire it).
  2. Retire them: drop the dead fields and SPECIFIC_FILE_INFERENCE_MODEL, or report them as null/"not computed".

Either way, rename or alias "Repository Archetype" honestly (schema change, so it needs a golden re-bless and DB migration notes).

Found during #4100 (PR #4105).

Activity

  1. added
    bugUnintended behavior or logic failure in the engine
    data-integrityIssues relating to RAM state or SQLite database fidelity
    core-engineModifications to the central physics and parsing engine
    on Oct 2, 2026
  2. added a commit that references this issue on Oct 2, 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

    bugUnintended behavior or logic failure in the enginecore-engineModifications to the central physics and parsing enginedata-integrityIssues relating to RAM state or SQLite database fidelitypriority: mediumscope:infraCI, tooling, churn/factory, docs infrastructure

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions