Skip to content

Dev-tooling batch: branch servers, walkthrough checks, judge-run (#348) - #349

Merged
Kyu-seok merged 36 commits into
masterfrom
spec/348-dev-tooling
Nov 16, 2026
Merged

Kyu-seok merged 36 commits into
masterfrom
spec/348-dev-tooling

Conversation

@Kyu-seok

@Kyu-seok Kyu-seok commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Implements the dev-tooling batch #348 (one /implement-spec run). All tickets merged, code-reviewed (standards and spec axes) and the review's fixes merged.

Closes #348
Closes #246
Closes #298
Closes #331
Closes #291
Closes #245
Closes #294
Closes #330
Closes #332
Closes #340
Closes #339

#329 was a change to the local walkthrough kit (no remote): kit main c52622b adds scripts/compare.mjs; closed by hand, no copy-in needed (nothing under kit/ changed).

Merged so far

Checked live

scripts/judge-run.sh piggy-bank-total against the integration branch's servers: 4/4 Accepted; status loop returned once up, exit 1 after stop; drop cleaned database, topics and Redis index.

Code review fixes

  • judge-run.py: NOT JUDGED no longer exits 2 (44 problems have only Python); an ordered Outcome replaces string re-ranking; restate-problem step 5 states the codes.
  • Port mutex: a pid-naming symlink broken only when its holder is dead, under a second link, so two waiters can't both break it (6-waiter test was red on the age-based break).
  • status reads ports into locals; use_database shared by setup and drop <name>; listener_pids / listener_verdict renames.
  • WalkthroughsMatchSamplesTest: free label and missing label are caught; with no Korean description, Korean labels follow the English Examples.
  • CLAUDE.md names orphans/drop <name> as the main-checkout exceptions and migrate as from a worktree; 24,990 of the 25,000-byte ceiling.

Not changed, on purpose: splitting dev-branch-servers.sh (bigger than this batch), the kit path ship-branch.sh repeats (its check runs from a temp tree), the kit check running after the PR push (as the header says).

Retro changes

  • merge-ticket.sh's gate also runs the pre-commit hook's repo-wide checks (doc references, kit copy, shellcheck, script tests) before Gradle: the servers merge in this run pushed a CLAUDE.md over its ceiling that the gate never checked.
  • CLAUDE.md's dev-branch-servers.sh paragraph points at the script's header for subcommands instead of copying it (24,404 bytes).
  • docs/agents/issue-tracker.md: an Agent Brief's Key interfaces name every command, script and class it edits, so a parallel run can see collisions.

🤖 Generated with Claude Code

Kyu-seok and others added 3 commits November 15, 2026 09:59
The header and the usage line now show the mode's integration branch
argument, and the header names it as how to rerun the checks and push
after a failure that turned out flaky. (#246)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tabs-language check read the Description tab once, so a slow render
on a loaded machine failed it with "(null)". It now waits for the tab
with waitFor, like the checks around it. (#298)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@Kyu-seok Kyu-seok mentioned this pull request Nov 15, 2026
11 tasks
Kyu-seok and others added 26 commits November 15, 2026 10:01
An agent starting the servers in the background had nothing to wait on:
status printed "not running" and exited 0. CLAUDE.md names the wait loop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every breakage case now breaks a small Walkthrough it builds (samples,
moves and map, table, intervals, set, board, graph, span fixtures)
instead of a real Walkthrough at a fixed frame or move, so regenerating
a tracer can no longer make a case fail for the wrong reason or pass
vacuously. Each case asserts the message it is caught with, and
aFixtureUnbrokenPasses shows every fixture passes before it is broken.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A port was checked free with lsof and bound only minutes later, so two
worktrees starting at once could both take it. Each port is now claimed
under a mkdir mutex, in a file naming the database and the start's pid,
until its stop releases it or the start is gone.

start and status also check that each port's listener is this checkout's
process (CODEBITE_DEV_BRANCH): a start fails at once when another server
answers on its port, and status exits 1 naming who holds it, or which
app isn't up yet. restate-problem no longer asks for an lsof by hand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run N of a Walkthrough must be labelled "Example N" ("예시 N") exactly
when the problem's description has **Example N:** (**예시 N:**), and
"Case N" ("케이스 N") otherwise, so a Restatement that turns a sample
into an Example can't leave a stale "Case N" behind. Breakage cases on
a fixture cover a Case label for an Example and an Example label for a
non-Example in both languages. Every Walkthrough on master passes, so
none is regenerated. restate-problem names the tracer rerun and
add-walkthrough the new check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, run labels match Examples

Co-Authored-By: Claude <noreply@anthropic.com>
Reading a problem as the branch has it needed start, about six minutes
of npm ci and three servers only for Flyway. migrate creates the branch
database as start does and runs this checkout's migrations, SQL and Java,
through common's migrateDatabase task (a source set of its own, so no
jar ships it), in seconds. The BEHIND warnings, restate-problem step 1,
triage-labels and CLAUDE.md point at it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sends each problem's scripts/replay-solutions files to the Run endpoint
of the backend dev-branch-servers.sh status prints (or --backend),
printing one verdict per Language and NOT JUDGED where no reference
solution exists; --former checks a Former Slug resolves. Runs are
spaced past the 5 s cooldown and a 429 is waited out; a refused
connection says to restart the branch servers and exits 2. (#339)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ship-branch removed a worktree but left the database, Kafka topics and
Redis index dev-branch-servers.sh made for it, and drop can't run from a
worktree that is gone. ship-branch now stops that worktree's branch
servers and drops their data from inside it before removing it; a
failure only warns. A worktree that never ran them has nothing to drop.

For those already left behind, dev-branch-servers.sh orphans lists the
branch databases whose worktree is gone and drop <name> drops one, from
any checkout, refusing any other database or one whose servers run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a branch backend

Co-Authored-By: Claude <noreply@anthropic.com>
…claims, migrate, orphans

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the kit on the machine, copy-walkthrough-kit.py --check now fails
when KIT_VERSION.json's kit commit is not an ancestor of the kit's main,
naming both commits and the git merge --ff-only that fixes it. A kit
without a main branch is noted, not failed; without the kit (CI) the
check is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI has no walkthrough kit, so ship-branch.sh runs the branch's own
copy-walkthrough-kit.py --check on its tree (git archive) with the kit
beside the main checkout, before waiting on CI; a failure merges nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on kit main

Co-Authored-By: Claude <noreply@anthropic.com>
A Language without a reference solution no longer turns the exit code to
2: most problems have only a Python one. Exit 2 is now only an unreachable
backend, an endless 429 or a missing problem; a problem with no judged
Language fails (1). The per-problem result is an ordered Outcome, worst
wins, in place of re-ranking 'failed'/'missing' strings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The header repeated the docstring, spacing included, and would drift
from it; it is now a usage line and a pointer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CLAUDE.md said the script refuses the main checkout outright; orphans and
drop <name> work there. Reading a problem says migrate runs from a
worktree again. Tighter wording elsewhere keeps CLAUDE.md under 25,000
bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A sample run with a free label (as only an extra run may have) or no
label is caught, in either language. A problem with no Korean
description had its Korean labels skipped, so any one passed; they now
follow the English description's Examples, the same samples.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two waiters that both found the mutex older than a minute could both
break it: the second removed the first's new one, and a start holding it
longer than a minute lost it too. The mutex is now a symlink naming the
holder's pid, broken only when that pid is gone and only under a
breaker link, so one waiter breaks it. The two-minute message no longer
rests on find -mmin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
listeners_ours and summary sourced $state/ports into the global shell,
overwriting a caller's port variables.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
setup and drop <name> each derived prefix and state from the database
name; use_database does it for both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Kyu-seok and others added 2 commits November 15, 2026 10:23
port_listeners and port_listener differed by one letter: one prints
pids, the other a verdict. They are now listener_pids and
listener_verdict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@Kyu-seok
Kyu-seok marked this pull request as ready for review November 15, 2026 01:26
Kyu-seok and others added 5 commits November 16, 2026 20:43
A ticket committed with --no-verify skipped check-doc-references, the kit
copy check, shellcheck and the script tests, and the gate ran only Gradle
and the frontend, so #348's servers merge pushed a CLAUDE.md over its size
ceiling that CI would have failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The paragraph had grown into a copy of the script's header, so every
subcommand change touched CLAUDE.md, which #348 left 10 bytes under its
ceiling. 24,404 bytes now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nter

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@Kyu-seok
Kyu-seok merged commit 5c2064f into master Nov 16, 2026
10 checks passed
@Kyu-seok
Kyu-seok deleted the spec/348-dev-tooling branch November 16, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment