Follow-up to #488. Tracks Layer 1 of the BocaNext design (the judge-side runtime, Layer 2, is designed in docs/plans/2026-05-29-boca-next-python-packager-design.md).
Scope
Layer 1 is the rbx-side packager that runs at rbx package time. It does not run on the judge. Its job is to assemble the .pyz bundles that embed the Layer 2 runtime and lay them out in the directory shape BOCA expects.
Location: rbx/box/packaging/boca_next/.
Responsibilities
LanguageSpec resolution — map the existing env.rbx.yml BOCA extension config (BocaExtension / BocaLanguageExtension) into the per-language LanguageSpec data the Layer 2 engine consumes (kind + argv templates + flags + limit modifiers). Ship rbx defaults; let users extend/override via env config (incl. defining new languages that reuse an existing kind).
- Manifest baking — produce the small per-(entrypoint, language)
manifest.json (task_type, resolved limits + max_time_error, bocajail/user policy, the one resolved LanguageSpec).
.pyz assembly — bundle the rbx_boca runtime package + manifest + embedded asset sources (checker.cpp, testlib.h, rbx.h, interactor.cpp, safeexec.c, pipe.c) into a zipapp per emitted file, with #!/usr/bin/env python3 shebang and exec bit. Generate the 3-line __main__.py per (entrypoint, language).
- Directory layout — emit
compile/<lang>, run/<lang>, compare/<lang>, limits/<lang>, tests/<lang>, plus description/problem.info + PDF, input/, output/, mirroring the existing BocaPackager output contract.
- CLI wiring — a new packager target (e.g.
rbx package boca-next) alongside the existing boca one. The existing bash BocaPackager is left untouched.
Notes / open questions for Layer 1
- Reuse existing limits resolution (
limits_info.get_limits(language, profile='boca')) and language-mapping utils (boca_language_utils.py).
- Decide how asset sources are embedded vs referenced (likely copied into each bundle's
assets/).
- Decide whether the
rbx_boca runtime is vendored into the bundle from source at package time or built once and reused.
- Document the new
python3 (>= 3.8) deployment requirement on the BOCA judge / bocajail.
Follow-up to #488. Tracks Layer 1 of the BocaNext design (the judge-side runtime, Layer 2, is designed in
docs/plans/2026-05-29-boca-next-python-packager-design.md).Scope
Layer 1 is the rbx-side packager that runs at
rbx packagetime. It does not run on the judge. Its job is to assemble the.pyzbundles that embed the Layer 2 runtime and lay them out in the directory shape BOCA expects.Location:
rbx/box/packaging/boca_next/.Responsibilities
LanguageSpecresolution — map the existingenv.rbx.ymlBOCA extension config (BocaExtension/BocaLanguageExtension) into the per-languageLanguageSpecdata the Layer 2 engine consumes (kind+ argv templates + flags + limit modifiers). Ship rbx defaults; let users extend/override via env config (incl. defining new languages that reuse an existingkind).manifest.json(task_type, resolved limits + max_time_error, bocajail/user policy, the one resolvedLanguageSpec)..pyzassembly — bundle therbx_bocaruntime package + manifest + embedded asset sources (checker.cpp, testlib.h, rbx.h, interactor.cpp, safeexec.c, pipe.c) into a zipapp per emitted file, with#!/usr/bin/env python3shebang and exec bit. Generate the 3-line__main__.pyper (entrypoint, language).compile/<lang>,run/<lang>,compare/<lang>,limits/<lang>,tests/<lang>, plusdescription/problem.info+ PDF,input/,output/, mirroring the existingBocaPackageroutput contract.rbx package boca-next) alongside the existingbocaone. The existing bashBocaPackageris left untouched.Notes / open questions for Layer 1
limits_info.get_limits(language, profile='boca')) and language-mapping utils (boca_language_utils.py).assets/).rbx_bocaruntime is vendored into the bundle from source at package time or built once and reused.python3(>= 3.8) deployment requirement on the BOCA judge / bocajail.