Repository navigation
Conversation
Java allows no import after a class, so a submission that opened with
an import failed to compile under the 72 Drivers that put a Library
marker or a class of their own above {USER_CODE}. Everything but the
Driver's imports now comes after it. JavaDriversCompileTest compiles
every Driver under a leading user import; ProgramTest pins the user's
line numbers on a moved Driver.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Each nested function two or more tracers shared is now one helper in codebite.py taking what the copy closed over, bound in the tracer with functools.partial where it had many call sites. nid only wrapped the kit's node_id, so it is bound from there. nested-copies.known is empty and goes, with the code that read it: the check now fails on any copy. Every Walkthrough regenerates byte-identical. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…he user's code (#412) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The frontend's built files were baked into the nginx image, so a deploy that changed the frontend replaced codebite-nginx and nothing listened on port 80 for about 2 s. nginx is now a stock image serving the codebite-frontend volume; the frontend image only holds the build and publish.sh, which copies it in (assets first, index.html renamed in last, a replaced build's assets kept 7 days). deploy-prod.sh tests the pulled nginx.conf before it rolls anything, publishes, and reloads nginx only when something it serves or proxies changed; the log says whether nginx was kept, reloaded or recreated. infra/nginx is mounted as a directory so a pulled nginx.conf is the one a reload reads. docs/adr/0014 records the decision. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ested helpers in codebite.py (#435) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…unning nginx (#434) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
start --wait waits while another worktree's set is live (app processes carrying its database, or the start that claimed the slot still running), says once whose, and gives up after CODEBITE_BRANCH_SERVERS_WAIT seconds naming the set and the command that stops it. A removed worktree's servers and a dead start's state hold nothing. Without --wait, start is as before. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ch behind the tip (#437) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…t, one live set at a time (#436) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Under --refresh the path-scoped checks now run for every branch, one that already contains HEAD too: a failed check leaves the refresh merge on the branch in its worktree, and the rerun used to find the tip contained and push unchecked. The rerun after a fix takes the local branch when it is ahead of origin's. Each step of refresh_ticket is checked and named (errexit is off under its caller's ||). frontend/publish.sh joins the shellcheck globs (hook, repo_checks, CI) and the hook's path rule that runs the script tests. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A publish that fails after the backend rolled now takes the rollback a failed final health check takes (roll_back: previous commit, backend and frontend build). restore_front checks each step and a failed restore is logged loudly; check_nginx_conf skips only when a `ps` that succeeded names no nginx; every reload goes through compose. publish.sh computes its build id null-delimited, one checked step at a time, so a spaced file name counts and a failed find or cksum stops it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The second await_detached case reused the first case's log, and its writer truncates it in the background, so the old summary line could still be there on the first read (CI run 45004083219). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…og between cases Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Kyu-seok
marked this pull request as ready for review
November 22, 2026 08:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Five tickets (#412 #434 #435 #436 #437) with no spec, landed on one integration branch.
State directory:
~/.cache/implement-spec/tickets-2026-11-22/(brief:BRIEF.md, merge log:merge-log.md). Integration tip:ff59ae5d.Merged
ticket/412-java-driver-imports): In 72 Java Drivers the Library markers and helper classes move below{USER_CODE}, so submitted Java that opens with animportcompiles;JavaDriversCompileTestcompiles every Driver under a leading import (72 failures on the base, 0 now); all 201 Java references Accepted locally and 14 of 14 runs on Judge0 with and without the import;docs/DRIVER_CODE.md,docs/SUBMISSION_FLOW.mdand the problem-generator agent show the new order. Owed: A decision: a runtime frame inside a Library now shows on the last user line, so that line can carry the same message twice (once per frame); deduping is a follow-up if wanted.ticket/435-tracer-nested-helpers): The twelve nested functions that Walkthrough tracers shared are eleven tested helpers inscripts/walkthroughs/codebite.py(nidbinds the kit'snode_idinstead), imported by the 30 tracers that had copies;nested-copies.knownand the code incheck-tracer-helpers.pythat read it are removed; all 200 tracers regenerate byte-identical.ticket/434-nginx-reload): A frontend deploy fills thecodebite-frontendvolume (assets first,index.htmlrenamed in last; a replaced build's assets stay 7 days) and reloads a running stocknginx:1.31-alpine;deploy-prod.shtestsnginx.confbefore rolling anything and logs whether nginx was kept, reloaded or recreated;infra/nginxis mounted as a directory so a pulled config reaches the container; ADR 0014. Local loop: 17 of 723 requests to/lost on the base, 0 of 569 across two frontend deploys on the branch. Owed: The deploy of this PR recreatescodebite-nginxone last time (about 2 s). The next deploy that changesfrontend/should logContainer codebite-nginx Runningandnginx: kept running, reloaded (frontend published): post its run id on Deploy: a frontend change recreates nginx and fails requests for ~2 s #434. Exercised only on compose 2.15.1 (the server runs 5.1.0), and the failed-health-check rollback was not run whole. To know: the config test fails, stopping a deploy, when grafana is down; a failed publish stops the deploy with the backend already rolled and no automatic rollback; the oldcodebite-nginx:latestimage stays on the server until removed.ticket/437-merge-ticket-refresh):scripts/merge-ticket.sh --refreshmerges the integration tip into a ticket branch that lacks it (in its worktree, or a temporary one), stops on a conflict naming the files, runs the pre-commit hook's path-scoped checks over the paths the ticket adds (never Gradle) and then takes the existing no-checks push;.githooks/pre-committakes its path list fromCODEBITE_HOOK_PATHSwhen set, so the rules are reused, not restated; without--refreshnothing changes (one usage-line assertion updated).ticket/436-branch-servers-wait):scripts/dev-branch-servers.sh start --waitwaits while another worktree's set is live (app processes on its database, or a start still running), naming that worktree, and gives up with exit 1 afterCODEBITE_BRANCH_SERVERS_WAITseconds (default 1800) naming the set and the command that stops it; a dead set or a gone worktree holds nothing; plainstartis unchanged;docs/agents/parallel-sessions.mdand CLAUDE.md tell agents to start with--wait --detach. Owed:.claude/skills/restate-problem/SKILL.mdand the hint inscripts/judge-run.pystill saystart --detach.ticket/review-fixes): Code-review fixes: undermerge-ticket.sh --refreshthe path-scoped checks always run, so a failed one stays failed on a rerun, and every step of the refresh is checked and named; a failed frontend publish rolls the deploy back the way a failed final health check does (oneroll_back), the frontend restore stops at its first failed step withPREVIOUS FRONTEND BUILD NOT RESTORED, the nginx config test fails closed when compose cannot say whether nginx runs, and every reload goes throughcompose exec;frontend/publish.shcomputes its build id null-delimited and is under shellcheck and the script-test path rule;docs/DEPLOYMENT_PLAN.mdfollows ADR 0014; a fixture for a helper class above{USER_CODE}, and theProgramTestline-number cases run on a fixture Driver; the restate-problem skill andjudge-run.pysaystart --wait --detach.ticket/detached-test-race):scripts/dev-branch-servers.test.sh: the "detached start died" case has a log file of its own; it shared one with the case before it and failed CI run 45004083219 on a race that was already on master.#412
#412 Java Drivers: Libraries and helper classes below
{USER_CODE}In 72 Java Drivers (70 with a Library marker, 2 with a
Nodeclass of their own) everything but the Driver'simportlines moved from above{USER_CODE}to just below it. Java allows noimportafter a class, so a submission that opened withimport java.util.stream.*;failed withclass, interface, or enum expectedon a line the user didn't write. Nothing in the user's code is hoisted or rewritten;ProblemAssets,ProgramandUserCodeLineMapperare unchanged.The count is 0. Java Drivers with a Library marker or a class declaration above
{USER_CODE}:prints
0on this branch and72on the base.The check.
JavaDriversCompileTest.everyJavaDriverCompilesWhenTheUsersCodeOpensWithAnImportcompiles every Java Driver at--release 13withimport java.util.stream.*;typed above its Starter Code. Before the move it named 72 Drivers (add-score-lists: line 41: class, interface, or enum expected | import java.util.stream.*;and 71 more); after it, none.What a user sees for a runtime frame inside a Library. The same as for a
Mainframe: the frame is below their code, so it is pinned to the last line of their code with the exception's message. Before, a Library frame was above their code and dropped, and only theMainframe was pinned there; now both are, so the last line carries the message twice. A frame in their own code still names its own line.Run on Judge0 through the branch backend,
binary-tree-level-order, a submission that opens with an import and returns a list holdingnull:The result's
errors: two entries, both on the last line of the user's code, bothjava.lang.NullPointerException,inUserCode: true.Errors in the user's own code, same backend,
add-score-lists(the user's code now starts on line 3 of the Program, right afterimport java.util.*;):;Main.java:6: error: ';' expectedat Solution.addScoreLists(Main.java:7),at Main.main(Main.java:56)Mainframe, as before)ProgramTestpins the three cases on the realadd-score-listsDriver.Judge0 (
scripts/judge-run.sh … --languages javaagainst the branch backend, Judge0 atnucbox:2358), each reference solution as it is and again withimport java.util.stream.*;as its first line:add-score-lists(ListNode),balanced-hamster-tree(TreeNode),brawler-lane-collision(JsonOutput),binary-tree-level-order(TreeNode and JsonOutput),snapshot-town-map(Node),clone-quest-logandpopulating-next-pointers(aNodeclass of the Driver's own): 14 of 14 ACCEPTED.Local judge.
scripts/judge-local.sh <slug> --languages javaover all 201 problems with a Java Driver, after the move: 201 ACCEPTED, none failed or NOT JUDGED.#434
#434: a frontend deploy no longer replaces nginx
The loop
The production compose file's
nginxservice (and, on the branch, itsfrontendservice) as written, beside a stub backend and a stub grafana, under compose projectticket434on127.0.0.1:8434. The frontend is the real one, built byfrontend/Dockerfile; each "frontend change" appends aconsole.infotosrc/main.tsx, which renames the entry chunk. A client requests/and build 1's hashed entry chunk every 100 ms and counts every answer that isn't 200 (000is no answer: refused, reset or nothing in 2 s). Deploys 2 and 3 run under it. Loop-only edits: project and image names, the port, and a 1 GB node heap cap in the build stage (a 4 GB Docker VM shared with other sessions).Red, on master (e749425)
Deploys by the commands
scripts/deploy-prod.shran there:compose build,compose up -d --remove-orphans,nginx -s reload.Every answered request for build 1's chunk after the first swap was a 404: the old build left with the old container.
Green, on the branch
Deploys by the functions
main()calls for the front, in its order:compose --profile publish build,check_nginx_conf,update_front. One request loop ran through all of: deploy 2, deploy 3, a brokennginx.conf, a rollback to build 2 (restore_front), and a deploy that changes nothing.index.htmlis build 3's.nginx -tin the throwaway container; nothing was reloaded and the loop kept getting 200. Inmain()that failure checks out the previous commit and exits 1 before the backend roll (scripts/deploy-prod.test.shruns that path against a stub docker).A changed
nginx.conf(a new response header, the file replaced by rename asgit pulldoes), under a second run of the loop on the same stack. It is a separate run because the first run's edit of the config was a no-op, a bug in the harness's perl; that step is left out of the log above:A change to the nginx service itself, after the loop (this is the one case that still drops requests):
What the loop found on the way
nginx -tin a throwaway container needs the compose network'sgrafanato resolve, so on a first bring-up with nothing running it failed.check_nginx_confnow skips when no nginx is running: there is nothing serving to protect.nginx.conf. git replaces that file on a pull, so the running container kept the old one and the deploy's reload re-read the old config; a config change only took effect when the container was next recreated. The mount is now the directory.The first deploy of this PR
It replaces
codebite-nginxonce more (its image and mounts change), so expect one last ~2 s gap; the volume is filled before that and no step by hand is needed. It pullsnginx:1.31-alpineandalpine:3.22. The oldcodebite-nginx:latestimage stays on the server until someone runsdocker image rm codebite-nginx.Owed after merge
The first deploy after this one that changes
frontend/should logand no
Container codebite-nginx Recreate. Its run id goes on the issue.Outside the ticket's key interfaces
frontend/publish.sh(new) andscripts/frontend-publish.test.sh(new): the copy into the volume and its test.frontend/nginx.conf(deleted): it was the baked image's own config, and the frontend image no longer contains nginx.#435
nested-copies.knownand the code that reads it are removed. All twelve listed nested functions moved, no line was kept, so the list was empty. An empty list with a reader is a standing way to let a copy through; with it gone,scripts/check-tracer-helpers.pyfails on every function two tracers share, nested or top-level, with no exception to add. Its three list tests (listed copy passes, third copy fails,STALE) are replaced by one: anested-copies.knownnaming a copy no longer lets it pass.No pair was judged "only alike": each of the twelve had the same meaning in every tracer that had it.
Where each went (
scripts/walkthroughs/codebite.py, each with tests inscripts/walkthroughs-codebite.test.py):bits(digits list, 2 files)bit_digits(v, width)bits(text, 2 files)bit_text(v, width)cell(4)table_cell(i, j)frame(7, one grid viewtable)table_frame(run, grid, caption, …)frame = partial(table_frame, run, grid)frame(2, topological sort)task_frame(run, n, prereqs, waiting, finished, ready, caption, leaving=None, …)partial;leavingis now an argument of the one frame that draws it, not a variable set and cleared around itfind(3)halving_find(parent, x, writes, visited)find = partial(halving_find, parent)root_of(3)union_root(parent, x)root_of = partial(union_root, parent)measure(2)hold_to_best(left, right, best, best_span), returning the new best and span instead of setting them withnonlocalname(3)node_name(node, dummy)name = partial(node_name, dummy=dummy)obj(2)node_object(node)returned(5)record_return(result, value)returned = partial(record_return, result)nid(6)node_id(order, node)nid = partial(node_id, order)Every Walkthrough was regenerated from its tracer against a database at this branch's migrations: no change under
common/src/main/resources/walkthroughs/.Closes #412
Closes #434
Closes #435
Closes #436
Closes #437
🤖 Generated with Claude Code