docs(natives): audit table of every native with a kernel verdict #409

Merged
argus merged 3 commits from loop/407-natives-audit into main 2026-10-23 04:22:29 +00:00
Collaborator

Closes #407 (step 1 of epic #52; does not close #52).

What

  • docs/design/NATIVES.md: one row per NativeEntry of compiler/src/backend/c/natives.trb (527), grouped by owner type or std module, with NativeTarget kind and verdict kernel/rewrite/keep. The kernel is a closed list of eight groups (K1-K8), keep rows name an edge, each rewrite row names its TorbScript shape, the kernel groups it needs and the deciding measurement (M1-M6). Counts: kernel 155, rewrite 200, keep 172.
  • docs/design/index.md lists it, docs/ROADMAP.md ("The kernel of natives") links it.
  • compiler/tests/natives-audit.test.trb: fails when a manifest entry has no row, a row has no entry, a verdict/group/need/measure is not in the record's own lists, the counts drift, or a native fn declared in std/ has no manifest entry.

Deviation

The issue asks for pdisc frontmatter. .pdisc.yaml excludes docs/* and design records carry no front matter, so NATIVES.md follows that convention.

Test

Locally with a nightly torb: the new test file (11 passed), torb format --check, docs index --check, docs skill docs skills (no change to skills/). Gates run in CI.

Seed impact: none.

Closes #407 (step 1 of epic #52; does not close #52). ## What - `docs/design/NATIVES.md`: one row per `NativeEntry` of `compiler/src/backend/c/natives.trb` (527), grouped by owner type or std module, with `NativeTarget` kind and verdict `kernel`/`rewrite`/`keep`. The kernel is a closed list of eight groups (K1-K8), `keep` rows name an edge, each `rewrite` row names its TorbScript shape, the kernel groups it needs and the deciding measurement (M1-M6). Counts: kernel 155, rewrite 200, keep 172. - `docs/design/index.md` lists it, `docs/ROADMAP.md` ("The kernel of natives") links it. - `compiler/tests/natives-audit.test.trb`: fails when a manifest entry has no row, a row has no entry, a verdict/group/need/measure is not in the record's own lists, the counts drift, or a `native fn` declared in `std/` has no manifest entry. ## Deviation The issue asks for pdisc frontmatter. `.pdisc.yaml` excludes `docs/*` and design records carry no front matter, so NATIVES.md follows that convention. ## Test Locally with a nightly torb: the new test file (11 passed), `torb format --check`, `docs index --check`, `docs skill docs skills` (no change to `skills/`). Gates run in CI. Seed impact: none.
docs(natives): rewrap the scope paragraph of the design index
All checks were successful
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 13s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 2m15s
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m21s
ci / tier A (linux-x64) (pull_request) Successful in 4m58s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 1m53s
ci / every host emits the same C (pull_request) Successful in 4m42s
ci / pack the seed (pull_request) Successful in 11s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
cda5bc413f
argus approved these changes 2026-10-23 04:22:28 +00:00
argus left a comment

Approved at cda5bc4.

  • Tests: ok. compiler/tests/natives-audit.test.trb checks manifest-vs-row both ways, duplicates, target kind, allowed verdict/group/need/measure values, written counts and native fn declarations of std/ without an entry. CI green on this head (gates, tier A, bootstrap, pdisc).
  • Correctness: ok. Table structure matches the stated columns; the kernel is a closed list K1-K8 and the drift check enforces membership.
  • Scope: ok. Matches issue #407 (docs plus the drift check only), no native or syntax change, seed impact none.
  • Security/data: ok. No secrets, no behavior change.
  • Docs: ok. docs/design/index.md and ROADMAP link the record. The missing pdisc frontmatter is a justified deviation (.pdisc.yaml excludes docs/*, pdisc check green).

Non-blocking: none.

Approved at cda5bc4. - Tests: ok. `compiler/tests/natives-audit.test.trb` checks manifest-vs-row both ways, duplicates, target kind, allowed verdict/group/need/measure values, written counts and `native fn` declarations of `std/` without an entry. CI green on this head (gates, tier A, bootstrap, pdisc). - Correctness: ok. Table structure matches the stated columns; the kernel is a closed list K1-K8 and the drift check enforces membership. - Scope: ok. Matches issue #407 (docs plus the drift check only), no native or syntax change, seed impact none. - Security/data: ok. No secrets, no behavior change. - Docs: ok. `docs/design/index.md` and ROADMAP link the record. The missing pdisc frontmatter is a justified deviation (`.pdisc.yaml` excludes `docs/*`, pdisc check green). Non-blocking: none.
argus merged commit d81b9b6edf into main 2026-10-23 04:22:29 +00:00
argus deleted branch loop/407-natives-audit 2026-10-23 04:22:29 +00:00
Sign in to join this conversation.
No reviewers
No labels
loop
ready
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language!409
No description provided.