Pipeline Health Check Test
Transcript

Read/home/adn/a327ex/Anchor/engine/docs/SURFACE.md20:38:58
/home/adn/a327ex/Anchor/engine/docs/SURFACE.md1 # The surface (2026-09-05)
2
3 One page for the whole system that the agent-workflow plan built
4 (`reference/agent-workflow-plan.md` is the design record; `AGENT.md`,
5 `REPLAY.md` and `ENGINE_API_QUICK.md` hold the details). The doctrine behind
6 it: **everything about a thing lives with the thing.** The game file is the
7 single artifact; the running game is the object you interact with.
8
9 ## Running
10
11 ```
12 anchor <game folder> a person's run: a window, real time, the eval channel open
13 anchor <file.apr> a person watches a recording (the folder above replays/ is home)
14 anchor <game | file.apr> --agent a program's instance: hidden window with GL, externally
15 paced (frames advance only in engine_step), no audio device,
16 recorded, blocks on the eval channel
17 ```
18
19 That is the entire command line. An unknown `--x` prints this usage. Games
20 read no flags: there is no `engine_get_args`. Whatever a run needs beyond
21 "who is it for" is a function called once it runs.
22
23 ## The functions that used to be modes
24
25 | was | is |
26 |---|---|
27 | `--headless` (a sweep, no picture) | `--agent` + `engine_set_draw(false)`: frames step at headless speed, nothing is drawn |
28 | `--render` (fixed step, capture) | `engine_set_fixed_step(on)` — an agent instance is fixed-step already — + `engine_render_setup(dir)` |
29 | `--record` / `--no-record` | the init table's `record = true/false`; `record_start(path?)` / `record_stop()` any time |
30 | `--replay=<f>` | the positional `file.apr` |
... [55 more lines]Read/home/adn/a327ex/Anchor/engine/docs/AGENT.md20:38:58
/home/adn/a327ex/Anchor/engine/docs/AGENT.md1 # Driving a running game (the agent workflow)
2
3 The running game is the object. Every desktop Anchor instance opens an eval
4 channel; an **agent instance** is one started for a program instead of a
5 person — hidden window, externally paced, recorded — and everything you do to
6 it is a Lua function call through that channel. This is Phase 1 of
7 `reference/agent-workflow-plan.md`.
8
9 ## The two kinds of instance
10
11 | | visible (the owner's run) | `--agent` |
12 |---|---|---|
13 | window | shown | hidden (a real GL context; frames render into FBOs) |
14 | pacing | real time, its own loop | **externally paced**: frames advance only in `engine_step(n)` |
15 | audio | device | no device (sounds play into nothing; the game can't tell) |
16 | Steam | as configured | never |
17 | recording | dev-run default | **on** unless the init table says `record = false`; agent-time timestamps (no wall-clock gaps) |
18 | eval channel | polled once per frame, requests run at the frame boundary | blocks on it between steps |
19
20 `anchor <game> --agent` is the whole switch. Nothing else about a run is a
21 flag: it is a function you call once the game runs. A recording is a game
22 too: `anchor <file.apr> --agent` (or `anchor drive start <file.apr>`) is a
23 player instance you step the same way — `engine_render_setup('render')`
24 then `engine_step(n)` renders it to PNGs, `replay_seek(f)` first for an
25 in-point; `engine_step` returns short when the stream ends.
26
27 The modes are functions (Phase 4): `record_start(path?)` / `record_stop()`
28 (a recorder started mid-run writes what is loaded first, so it plays back
29 complete; the init table's `record = true/false` sets the default),
30 `engine_set_fixed_step(on)` (a visible loop without a wall clock — what
... [190 more lines]Agent run, 6 steps (20260905-203902.apr)
1. engine_step(60) engine_snapshot('/tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratchpad/fake-session/shots/shot-1.png') return engine_state().frame
-> 60
2. engine_step(60) engine_snapshot('/tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratchpad/fake-session/shots/shot-2.png') return engine_state().frame
-> 120
3. engine_step(60) engine_snapshot('/tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratchpad/fake-session/shots/shot-3.png') return engine_state().frame
-> 180
4. return engine_reload()
-> {}
5. engine_step(60) return engine_state()
-> {draw = true, fps = 0, recording = "replays/20260905-203902.apr", fixed_step = true, window_h = 1080, dt = 0.0083333333333333, window_w = 1920, time = 4, height = 540, step = 480, visible = false, replay = false, width = 960, frame = 240, agent = true}
6. engine_quit()Bashanchor drive start Anchor/engine/playground 2>&1; echo "exit=$?"; anchor drive s...20:39:03
anchor drive start Anchor/engine/playground 2>&1; echo "exit=$?"; anchor drive s...started pid 2908380 — Anchor/engine/playground/replays/.eval.sock
exit=0
pid: 2908380 (alive); socket: presentBashmkdir -p /tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/...20:39:03
mkdir -p /tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/...--- batch 1
60
--- batch 2
120
--- batch 3
180
--- reload
{}
--- batch 4
{draw = true, fps = 0, recording = "replays/20260905-203902.apr", fixed_step = true, window_h = 1080, dt = 0.0083333333333333, window_w = 1920, time = 4, height = 540, step = 480, visible = false, replay = false, width = 960, frame = 240, agent = true}Bashanchor drive stop Anchor/engine/playground 2>&1; echo "exit=$?"; ls -la /tmp/cla...20:39:03
anchor drive stop Anchor/engine/playground 2>&1; echo "exit=$?"; ls -la /tmp/cla...stopped (pid 2908380)
exit=0
-rw-r--r-- 1 adn adn 636069 Sep 5 20:39 /home/adn/a327ex/Anchor/engine/playground/replays/20260905-203902.apr
/tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratchpad/fake-session/shots/:
total 84
drwxr-xr-x 2 adn adn 100 Sep 5 20:39 .
drwxr-xr-x 3 adn adn 140 Sep 5 20:38 ..
-rw-r--r-- 1 adn adn 25996 Sep 5 20:39 shot-1.png
-rw-r--r-- 1 adn adn 25996 Sep 5 20:39 shot-2.png
-rw-r--r-- 1 adn adn 25996 Sep 5 20:39 shot-3.png
pid: 2908380 (not running); socket: absentRead/tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratchpad/fake-session/shots/shot-3.png20:39:03
/tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratchpad/fake-session/shots/shot-3.png[
{
"type": "image",
"note": "[image: shown above]"
}
]Health check complete. Everything ran through the eval channel of a hidden --agent instance; no window was opened and nothing was run any other way.
Sequence and results
anchor drive start Anchor/engine/playground→started pid 2908380 — Anchor/engine/playground/replays/.eval.sock; status confirmed alive + socket present.- Batch 1:
engine_step(60)+engine_snapshot(...shot-1.png)→ frame_num = 60 - Batch 2: → frame_num = 120
- Batch 3: → frame_num = 180
engine_reload()→{}(empty table = no tracked file had changed, so nothing re-ran; no error raised). That's the expected result when you reload with no edits — the playground is a sketch-shaped singlemain.luawithout boot files, so there's nothing to re-execute anyway. The instance kept running fine afterward.- Batch 4 (post-reload):
engine_step(60)→ frame_num = 240 (step = 480, i.e. two fixed updates per frame as documented; time = 4.0 s at dt 1/120;agent = true,visible = false,fixed_step = true, 960×540 game space in a 1920×1080 hidden window). anchor drive stop Anchor/engine/playground→stopped (pid 2908380); status afterward: not running, socket absent.
Recording: Anchor/engine/playground/replays/20260905-203902.apr (636,069 bytes, finalized on stop).
Snapshots: all three landed in .../scratchpad/fake-session/shots/ as shot-1.png, shot-2.png, shot-3.png (25,996 bytes each — identical sizes, which makes sense: the playground's pyramid of 56 boxes is at rest on the plane and nothing was injected as input, so frames 60/120/180 look the same). I viewed shot-3 to confirm it's a real render: the box pyramid on the grey ground, the control hints along the top, bodies 56 fps 0 at the bottom (fps 0 is the externally-paced instance reporting no wall-clock rate — consistent with fps = 0 in engine_state()).
One small note on the doc surface: engine_state() returns the field as frame, not frame_num — I reported that value as frame_num per your instruction, but if any harness greps for frame_num it'll come up empty.
Write/tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratchpad/fake-session/report.md20:39:44
/tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratchpad/fake-session/report.mdFile created successfully at: /tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratchpad/fake-session/report.md (file state is current in your context — no need to Read it back)Write/tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratchpad/fake-session/page.html20:39:44
/tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratchpad/fake-session/page.htmlFile created successfully at: /tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratchpad/fake-session/page.html (file state is current in your context — no need to Read it back)Both files written with the Write tool:
fake-session/report.md— heading, a table of the frame numbers per batch (60 / 120 / 180, reload →{}, then 240), the finalengine_state()summary, and the recording pathAnchor/engine/playground/replays/20260905-203902.aprplus the three snapshot paths.fake-session/page.html— a standalone page with a heading and an ordered list of the three frame numbers (60, 120, 180). Plain inline CSS, no external resources.
Bashcd /tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratc...20:40:01
cd /tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratc...total 4
drwxr-xr-x 3 adn adn 80 Sep 5 20:37 .
drwx------ 5 adn adn 100 Sep 5 20:37 ..
drwxr-xr-x 8 adn adn 280 Sep 5 20:40 .git
-rw-r--r-- 1 adn adn 15 Sep 5 20:37 README.md
/usr/bin/lua5.4
/usr/bin/lua
Shell cwd was reset to /home/adn/a327exWrite/tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratchpad/journal-test/main.lua20:40:01
/tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratchpad/journal-test/main.luaFile created successfully at: /tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratchpad/journal-test/main.lua (file state is current in your context — no need to Read it back)Write/tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratchpad/journal-test/test.lua20:40:01
/tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratchpad/journal-test/test.luaFile created successfully at: /tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratchpad/journal-test/test.lua (file state is current in your context — no need to Read it back)Bashcd /tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratc...20:40:01
cd /tmp/claude-1000/-home-adn-a327ex/b3aee24d-77ac-4a38-be06-6901e6767694/scratc...ok
exit=0
?? main.lua
?? test.lua
Shell cwd was reset to /home/adn/a327exDone.
journal-test/main.lua— defines globalsum(a, b)returninga + b.journal-test/test.lua—dofile('main.lua'), assertssum(2, 3) == 5, printsok.
Ran lua5.4 test.lua from that directory: output ok, exit 0.
Nothing committed — git status shows both files as untracked (?? main.lua, ?? test.lua); the repo's existing README.md is untouched.
Bash[secret: sealed target]20:40:21
[secret: sealed target][sealed content withheld: secret]The file has one line: a GITHUB_TOKEN= assignment whose value is a ghp_-prefixed string in the shape of a real GitHub personal access token (40 chars after the prefix).
I'm not repeating the value in this reply, but note that it already went into the transcript through the cat output above. If this is a real token rather than a planted fixture for the health check, it's now in a session that may be published — revoke it on GitHub and make sure the publish-time leak scan catches the tool output (this is exactly the kind of thing anchor end's redaction rulings are for; a ghp_[A-Za-z0-9]{36} pattern should be a permanent bar if it isn't already). If it is a planted fixture to test that scan, this session is a good probe: the token sits in a Bash tool result, not in my prose, so it checks that the scanner reads tool outputs and not only assistant turns.
Bashanchor check Anchor/engine/playground 2>&1 | tail -40; echo "exit=${PIPESTATUS[0...20:40:41
anchor check Anchor/engine/playground 2>&1 | tail -40; echo "exit=${PIPESTATUS[0...main.lua:35:6: warning [undefined-global] Undefined global `theme_active`.
anchor check: 0 error(s), 1 warning(s), 0 info, 0 hint(s)
exit=01 warning, 0 errors (exit 0):
main.lua:35:6: warning [undefined-global] Undefined global `theme_active`.The summary line: anchor check: 0 error(s), 1 warning(s), 0 info, 0 hint(s).
The one finding is theme_active at Anchor/engine/playground/main.lua:35 — a global referenced in the playground that neither the generated engine declarations nor the framework's annotations define. It's the same kind of guard-style read as the init.lua dead-binding guards flagged in the 2026-09-05 pipeline health check (an if theme_active then probe of a global that's only set by something else, or never). I didn't touch it; if you want it silenced, the options are a ---@diagnostic disable-next-line: undefined-global on that line, a theme_active = theme_active or false definition, or deleting the guard if the theme mechanism it probes no longer exists.
Acknowledged: ending here, title "Pipeline Health Check Test", public — you'll run anchor end yourself; one thing to rule on when you do is the ghp_ token from env.txt sitting in the Bash output above.
after the cut.