natives: audit table of every native with a kernel verdict (step 1 of #52) #407
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Step 1 of #52 (natives: audit and reduce the manifest to a kernel; ROADMAP "The kernel of natives"). Before any native is rewritten, every native has to be classified, so the later steps (#53
native fnbodies as IR, #55 collections onBuffer, and the rewrites themselves) work from one agreed list. This step is documentation only.Goal
A design record
docs/design/NATIVES.mdthat lists everynativedeclaration ofstd/with a verdict, and names the kernel.Acceptance criteria
docs/design/NATIVES.mdexists, with pdisc frontmatter and an entry indocs/design/index.md.compiler/src/backend/c/natives.trb(NativeEntry, grouped by owner type orstd/module): name,NativeTargetkind, verdictkernel/rewrite/keep(the OS, clock, file or network edge that cannot be written in TorbScript), and forrewritethe TorbScript shape it takes and which kernel natives it needs.kernelrow belongs to it.tools/or atorb testfile) fails when anativedeclaration ofstd/or a manifest entry has no row, so the table cannot drift.rewriterow names the measurement that decides it (the existingtools/buffer-cost.shpattern or a new benchmark in forge CI); the measuring and the rewrites are later steps, not part of this one.docs/regeneratesskills/asCLAUDE.mdrequires; gates green in both tiers.Design record point
ROADMAP "The kernel of natives"; BACKEND 3.7 (the manifest); COLLECTIONS gap 6 (
Buffer).Seed impact
None. No native, syntax, driver flag or looked-up std name changes; the manifest check only reads. The two-commit rule applies to the later rewrite steps, not here.
Size
One PR, one Conventional Commit (
docs(natives): ..., plustestorchorefor the drift check if separate).Dependencies
None. Blocks the rewrite steps of #52; related to #53 and #55.
[loop:torbscript] claim implement by session:loop-torbscript-20261023 until 2026-10-23T08:09:18Z
native fnandnative { }(step 1 of #53) #410native fnbodies as IR andnative { }blocks #53ArrayList, the hash tables and the tries onBuffer(step 1 of #55) #413[loop:torbscript] implement: PR #409 open, CI green. NATIVES.md holds one row for each of the 527 manifest entries (kernel 155, rewrite 200, keep 172), the kernel is a closed list of eight groups, and each rewrite row names its shape, the kernel groups it needs and its measurement.
compiler/tests/natives-audit.test.trbfails on a missing or extra row, a verdict outside the record's lists, drifting counts, or anative fnin std/ without a manifest entry. Deviation: no pdisc frontmatter, since pdisc excludes docs/* and design records have none. Tokens: not exposed to this subagent, no figure available. next: review