Skip to content

Implement the 1 empty function body in specs/test_framework/graph_drift_detection.t27 #4372

Description

@gHashTag

Re-filed from #3970. An attempt claimed that issue on 2026-09-17 and left an empty branch, and a dispatch row that has spent its retry ceiling keeps its issue for good - so no bee could take it again, however much the brief improved. The work below is carried over unchanged.


Implement the 1 empty function body in specs/test_framework/graph_drift_detection.t27

Context

specs/test_framework/graph_drift_detection.t27 is 650 lines long. 1 of its functions is declared with a body that holds no statement - a signature and a comment where the implementation belongs.

.t27 is the hand-authored source language. t27c compiles it out to C, Rust, Verilog and Zig. You are writing source, not compiler output, and not prose about an implementation.

Current state - re-run these yourself

$ cd /Users/playom/t27
$ t27c gen specs/test_framework/graph_drift_detection.t27 2>&1 | grep -c 'not yet implemented'
1
$ t27c spec-status specs/test_framework/graph_drift_detection.t27
NOPARSE

Use t27c, not the t27c on PATH: the PATH build prints no parse metrics at all, so the grep above returns nothing and an empty result reads as a pass.

What to write

Keep every signature exactly as it is - the signature is the contract. Quoted verbatim from the file:

  1. line 77 - fn default_drift_config() -> DriftConfig

The file already has 0 test block(s). Add one for each function you implement; a body with nothing asserting on it is a claim, not a result.

Acceptance criteria

    1. t27c gen specs/test_framework/graph_drift_detection.t27 > /tmp/t27-gen.zig && grep -c 'not yet implemented' /tmp/t27-gen.zig prints 0 (today: 1)
    1. t27c spec-status specs/test_framework/graph_drift_detection.t27 does not print NOPARSE - the file still parses. (This replaces a parse-metrics criterion. The compiler in the container prints no such metrics, so the command printed nothing and no work could ever satisfy it.)
    1. with criterion 1 satisfied, all 1 name above still exist: grep -cE '^\s*(pub )?fn (default_drift_config)\(' specs/test_framework/graph_drift_detection.t27 prints 1
    1. grep -cE '^[[:space:]]*test[[:space:]]+("|[A-Za-z_])' specs/test_framework/graph_drift_detection.t27 prints at least 1 (today: 7)

Boundary

specs/test_framework/graph_drift_detection.t27

The instruments

Every one of these reads and prints; none of them writes. Run them from the repository root, with <spec> replaced by the file in `## User Scenarios & Testing

  • Given specs/test_framework/graph_drift_detection.t27 as it stands today,
    when the work described above is done and the commands under Acceptance criteria are run from the repository root,
    then each of those commands prints the value stated beside it.

Requirements

  • FR-001: every signature already in the file MUST stay exactly as it is - the signature is the contract, and a caller elsewhere is holding it.
  • FR-002: the file MUST still parse afterwards. t27c parse specs/test_framework/graph_drift_detection.t27 is the check, and a spec that stops parsing generates nothing, so every test it already carried stops running too.
  • FR-003: no function MUST be deleted to satisfy a count.

Boundary`:

  • t27c spec-status <spec> - the compiler's one-word verdict: IMPLEMENTED, PARTIAL, UNWRITTEN, NOPARSE, NOFN. Exit code is 0 whatever it says, so read the word.
  • t27c symbols <spec> - every name the file declares, with its kind. Answers "does this already exist here?" before you add it.
  • t27c outline <spec> - per function: its locals, what it calls, what it returns. The contract you are implementing against.
  • t27c coverage <spec> - which functions have a test and which do not. The issue asks for tests; this is how you check you wrote them.
  • t27c lint <spec> - style and shape warnings. It OVER-REPORTS has no test or invariant: measured 2026-09-20 over 60 specs it printed 677 of those where coverage found 190 untested functions, disagreeing on 59 of the 60 - it warns about bit_to_trit_pair in specs/base/ternary_encoding.t27, which test bit_to_trit_pair_zero calls on line 249. Read it as a hint; coverage is the answer.
  • t27c typecheck <spec> - types, before generation. Prints Typecheck OK (0 errors, 0 warnings) or the errors.
  • t27c test-report <spec> - builds this spec and runs its own tests, which is what the oracle does. BLOCKED means the generated Zig does not compile, with the error beside it.
  • python3 tools/dupe_scan.py --name <function> - where that function already lives, if it does. 576 of 4021 bodies here are byte-identical copies.

The rest of the toolbelt is in docs/BEE_TOOLBELT.md.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions