Repository navigation
gen-ts: fn bodies skipped while __NOT_EMITTED__ is empty (agent-hive-group.t27) #6559
Description
What happens
t27c gen-ts specs/automation/agent-hive-group.t27 (v2, merged in #6558) emits only the pub const values. Every fn is replaced by a comment such as:
// fn typing_due was not emitted -- this backend lowers declarations, not bodies
The manifest still says nothing was skipped:
export const __NOT_EMITTED__ = Object.freeze([] as const);The spec has 12 fn and 12 test blocks. None of them reaches the host.
Why it matters
This is the gen-ts version of #6374, which reports the same empty manifest for gen-js. A host that reads __NOT_EMITTED__ to see what it still has to write by hand is told "nothing", which is not true.
It also blocks the spec-first route in gHashTag/999-multibots-telegraf. The hive laws (follows_up, may_answer_after_stop, heard_while_muted, typing_due, speaks_on_all) are pure boolean functions over integers and booleans. They are the smallest possible case for the opt-in body lowering asked for in #6101. Because gen-ts cannot emit them, the host has to restate each law in hand-written TypeScript. Under the only-t27 rule (specs/policy/own_language.t27) that host code is parked until the owner applies owner-approved-foreign.
Asks
- gen-ts: list every skipped
fnandtestin__NOT_EMITTED__, the same fix gen-js: fn add skipped in a comment while __NOT_EMITTED__ is empty #6374 asks for in gen-js. - Scope gen-js: an opt-in lowering of fn bodies, so a spec's behaviour can reach JavaScript too #6101 to cover gen-ts as well. A first slice that lowers only pure expression-bodied
fn(arithmetic, comparison,&&/||/!, no loops and no I/O) would cover every law inagent-hive-group.t27.
Related: #6101, #6374, #6558, gHashTag/999-multibots-telegraf#3641.
Boundary
specs/automation/agent-hive-group.t27specs/policy/own_language.t27
User Scenarios
-
Given a spec
specs/automation/agent-hive-group.t27with 12fnand 12testblocks, when runningt27c gen-ts specs/automation/agent-hive-group.t27, then the emitted TypeScript lists every skippedfnandtestname in__NOT_EMITTED__instead of an empty array. -
Given the host reads
__NOT_EMITTED__to discover what it must implement by hand, when the array contains the 24 skipped items, then the host can rely on the manifest rather than being told "nothing".
Requirements
- FR-001: gen-ts backend MUST populate
__NOT_EMITTED__with the fully-qualified names of everyfnandtestblock that is not lowered to a body. - FR-002: The manifest entry for each skipped item MUST use the same naming scheme as the gen-js fix in gen-js: fn add skipped in a comment while __NOT_EMITTED__ is empty #6374.
- FR-003: Pure expression-bodied
fn(arithmetic, comparison,&&/||/!, no loops, no I/O) MUST be lowered to bodies in gen-ts as the first slice of gen-js: an opt-in lowering of fn bodies, so a spec's behaviour can reach JavaScript too #6101, covering all laws inagent-hive-group.t27.
Success Criteria
t27c gen-ts specs/automation/agent-hive-group.t27produces a__NOT_EMITTED__array of length 24 (12 fn + 12 test) and exits 0.- After the gen-js: an opt-in lowering of fn bodies, so a spec's behaviour can reach JavaScript too #6101 slice lands,
t27c gen-ts specs/automation/agent-hive-group.t27emits bodies for the 12 purefnand__NOT_EMITTED__shrinks to 12 (only thetestblocks remain) and exits 0. - The generated file
specs/automation/agent-hive-group.tscontains no "// fn ... was not emitted" comments for the 12 pure functions.
Activity
gHashTag commentedon Oct 5, 2026
Owner decision, 2026-10-06: approved as foreign (Rust) work under
owner-approved-foreign.fix(gen-ts): refuse names that hide what lowered code relies on, and …
fix(gen-ts): refuse the names every artifact exports, and name a real…