Repository navigation
refactor(ci3): separate the public interface from internal scripts - #1
Merged
Merged
Conversation
Now that ci3 is shared, consuming repositories need to know what they can rely on. An audit of every reference in aztec-node and aztec-packages (path-form anywhere, bare names in shell-like files, since ci3 is on PATH) found 28 of 87 top-level files that neither repository touches. - 13 are used only by other ci3 scripts and move to internal/. - 10 are referenced by nothing at all and move there too, as removal candidates. - 3 are tests that were never enrolled; they move to tests/, where bootstrap.sh picks them up. Enrolling upload_benchmarks_test is what exposed the undefined github_repo_url fixed on main. - bench_compare stays public: a consumer skill documents it. internal/ is added to PATH so ci3's scripts keep calling each other by name. The README gains an Interface section covering the public/internal split, what ci3 expects from a consuming repository, and the shared state that has to stay compatible between ci3 versions. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
cache_ls, cache_delete, clean_remote_tags and start_interactive have no scripted callers because they are operator tools, which makes them part of the interface rather than internal. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
joblog.txt and .logged_test_flakes are written by parallelize into the repository root. Standalone, that is this repository, and they had been committed by accident. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
source_redis, source_refname and source_cache were only referenced by consumers on the line after `source ci3/source`, which sources all three itself. They are implementation details of that entry point, not things to source separately, so they move to internal/. The consumers drop the redundant lines. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The audit matched comment text as usage. aws_request_instance_type, log_ci_run, post_github_status, redact and run_test_cmd are named in consumer comments but called only by other ci3 scripts, so they are internal. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Only bootstrap_ec2 runs it, on the build instance; no consuming repository does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
charlielye
force-pushed
the
cl/public-interface
branch
from
October 22, 2026 16:41
980f553 to
452fc75
Compare
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.
Now that ci3 is shared by more than one repository, consumers need to know what they can rely on. This identifies the public interface by audit and moves everything else under
internal/.Definition
Public is whatever a consuming repository sources or executes, or a person runs by hand. Everything else is internal.
Audit method
For each of the 87 top-level files, across
aztec-nodeandaztec-packages(including.github/andaztec-packages'ci3-local/), excluding ci3 itself:ci3/<name>,$ci3/<name>) in any file.*.sh,*.yml, Makefiles, extensionless scripts), because ci3 is onPATHand most calls look likedenoise "...".Result
cache_ls,cache_delete,clean_remote_tags,start_interactive)bench_compare)internal/internal/mainsince, used only by ci3 (apply_private_release_patch, from aztec-node#420)internal/internal/, removal candidatestests/Used only inside ci3:
exec_test,filter_cached_test_cmd,get_test_entry,parallelize_strict,sem_sched,semc.c,source_color,source_options,source_stdlib,source_test_params,ssm_send_command,total_mem_gb; and, named in consumer comments but called only from ci3:aws_request_instance_type,log_ci_run,post_github_status,redact,run_test_cmd.Redundantly referenced:
source_redis,source_refname,source_cache. Every consumer reference sat on the line aftersource ci3/source, which sources all three itself. They are implementation details of that entry point. The consumer PRs drop those lines (ci.shin both repos, two barretenberg benchmark scripts inaztec-packages), which must land before a consumer bumps its pin to this.That leaves the sourcing interface as three entry points (
source,source_base,source_bootstrap) and two opt-ins (source_npm_auth,source_release_target).Referenced by nothing (not deleted here; that is a separate call):
add_log_time_delta,cpuset_count,docker_has_image,fd_monitor,get_test_owner,source_test,squash_args.Narrowly used, worth a look later: about 25 public scripts are referenced from three or fewer files. Several have a single caller, e.g.
log_ci_runandrun_test_cmd(onlyci.sh),bench_engine/test_engine/spinner(only the rootbootstrap.sh). They are genuinely public today, but are candidates for folding behind fewer entry points.Mechanics
internal/is added toPATHinsource_base, so ci3's scripts keep calling each other by name. It is a documented boundary, not an enforced one.$ci3/<name>→$ci3/internal/<name>, and self-locatingsourcelines insideinternal/go up one level.tests/, wherebootstrap.shenrolls them. Doing this is what exposed the undefinedgithub_repo_urlinupload_benchmarks, fixed separately onmain: its test only printedcommand not foundto stderr and passed anyway.README
Adds an Interface section: the public/internal split; the reverse interface (files ci3 expects from the consuming repository:
.test_patterns.yml,scripts/process_flake_log.py,.release-please-manifest.json,build-images/src/home/.gitconfig); and the state that must stay compatible between ci3 versions, since a repository and a submodule of it each pin their own.Testing
aztec-nodewith the working directory insideci3/: 8 tests, up from 5.source ci3/sourcestill provides the stdlib functions and colours, and internal commands resolve throughPATHtoci3/internal/.Rebased on main (2026-10-22)
Rebased onto
mainafter the ports from aztec-node (#304–#544) and the AMI fix. One script was added onmainin the meantime,apply_private_release_patch, which onlybootstrap_ec2runs; it moves tointernal/and its call site follows. The suite passes standalone and as a submodule of both consumers (8/8 each), andsource ci3/sourcefrom a consumer still provides the stdlib, redis and the ref name, with internal commands resolving throughPATH. The consumer PRs, aztec-labs-eng/aztec-node#278 and AztecProtocol/aztec-packages#25516, already drop the redundantsource_redis/source_refname/source_cachelines.🤖 Generated with Claude Code