Context
specs/ml/rl/ppo_critic.t27 declares module PpoCritic in 105 lines. 4 of its functions are 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
$ ./target/release/t27c gen specs/ml/rl/ppo_critic.t27 2>&1 | grep -c 'not yet implemented'
4
$ ./target/release/t27c parse specs/ml/rl/ppo_critic.t27 2>&1 | grep -E '^(recovery-events|declarations-swallowed|lexer-discarded-chars):'
recovery-events: 0
declarations-swallowed: 0
lexer-discarded-chars: 0
Use ./target/release/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:
- line 34 —
fn forward(state: []const f32, params: []const f32, config: CriticConfig) -> f32
- line 39 —
fn compute_advantage(rewards: []f32, values: []f32, gamma: f32, lambda_: f32) -> []f32
- line 44 —
fn compute_returns(rewards: []f32, gamma: f32) -> []f32
- line 49 —
fn value_loss(predicted_values: []f32, target_values: []f32) -> f32
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
-
./target/release/t27c gen specs/ml/rl/ppo_critic.t27 2>&1 | grep -c 'not yet implemented' prints 0
-
- with criterion 1 satisfied,
./target/release/t27c parse specs/ml/rl/ppo_critic.t27 2>&1 | grep -E '^(recovery-events|declarations-swallowed|lexer-discarded-chars):' reports 0, 0 and 0
-
- with criterion 1 satisfied, all 4 names above still exist:
grep -cE '^\s*(pub )?fn (forward|compute_advantage|compute_returns|value_loss)\(' specs/ml/rl/ppo_critic.t27 prints 4
-
grep -c '^\s*test "' specs/ml/rl/ppo_critic.t27 prints at least 4 (today: 0)
Boundary
specs/ml/rl/ppo_critic.t27
Context
specs/ml/rl/ppo_critic.t27declares modulePpoCriticin 105 lines. 4 of its functions are declared with a body that holds no statement — a signature and a comment where the implementation belongs..t27is the hand-authored source language.t27ccompiles 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
Use
./target/release/t27c, not thet27con 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:
fn forward(state: []const f32, params: []const f32, config: CriticConfig) -> f32fn compute_advantage(rewards: []f32, values: []f32, gamma: f32, lambda_: f32) -> []f32fn compute_returns(rewards: []f32, gamma: f32) -> []f32fn value_loss(predicted_values: []f32, target_values: []f32) -> f32The file already has 0
testblock(s). Add one for each function you implement; a body with nothing asserting on it is a claim, not a result.Acceptance criteria
./target/release/t27c gen specs/ml/rl/ppo_critic.t27 2>&1 | grep -c 'not yet implemented'prints0./target/release/t27c parse specs/ml/rl/ppo_critic.t27 2>&1 | grep -E '^(recovery-events|declarations-swallowed|lexer-discarded-chars):'reports 0, 0 and 0grep -cE '^\s*(pub )?fn (forward|compute_advantage|compute_returns|value_loss)\(' specs/ml/rl/ppo_critic.t27prints4grep -c '^\s*test "' specs/ml/rl/ppo_critic.t27prints at least4(today: 0)Boundary
specs/ml/rl/ppo_critic.t27