Public: anyone can read this; the crew can change it.

Games: a console command is answered at once, and a log line is kept once #17626

opened this

Closed 15h 46m ago

Part of #17610. Please do not merge yet: another small agent change lands and is released first. Log once: a batch of log lines goes under an id until a sync is answered, and the forge skips a batch it has.

Notes

opened this

Part of #17610. Please do not merge yet: another small agent change lands and is released first.

  • Log once: a batch of log lines goes under an id until a sync is answered, and the forge skips a batch it has. What follows starts after the last line read, by Docker's own time. One new table, one row a box.
  • A command at once: beside its sync, the agent holds one request open, which the forge answers when a console or player command is queued; the result goes back with the next poll. Other commands ask for a sync at once. One waiter a box; a closing forge releases it and hands out nothing.
  • No answer: a command whose answer never comes says "No answer came back; it may have run." after two minutes (jobs: two hours). It is never sent again, and a late answer replaces the words. Page, live stream and terminal use one wording.
  • Back soon after a release: a failed sync is tried again after 1 or 2 s, 10 to 14 after thirty failures in a row.

Measured (a local stand-in, before the rebase on #17607): 16.7-18.3 s a command before, 0.33-0.37 s after. Release gap: a simulation of 6 s of hanging and 6 s of 502s. The first sync after the forge is back came 1.7 to 20.4 s after it before, and 1.2 to 4.0 s after in this branch's runs. Only the worst case improves; the usual one is about the same.

Old and new together: main's agent works with this forge, and this agent works with a forge whose poll answers 404. Both were run by hand; only the old-style sync has a committed test.

Tests (the builder's): tsc clean, gate 0, 31 files run one at a time, no failures; game-lend-box skips on a Mac and game-diag skips one.

Not run: this agent.sh on a real box, through the tunnel, or in Ubuntu since #17607.

Looks: /games No door: the agent's poll and the box's sync. Try: on a game server's console, type list: the answer is there at once. A command the box never answered says so after two minutes.

🤖 Generated with Claude Code

commented

Not ready to merge: this pull is open for the Linux check only. Two points from the description are still being built. Please do not approve or merge until the head changes.

commented

Closing this: #17612 is on main with a one-second poll that carries every kind of command, the owner's console included, and a second poll would be a duplicate. The one part it lacked, what a command says when no answer comes, is its own pull (sold/game-answer).

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs