Overview
Each item is a development task in a real codebase, asked the way developers ask a coding agent in their editor: a short request, often incomplete, whose intent has to be recovered from the code, for a change that usually spans several files. An item has two parts: a Harbor task (the codebase and its full toolchain in an offline Docker environment, the request, a hidden grader of tests and a rubric, and a reference solution), usable for RL; and a full trajectory (Claude Opus 5.5 at max effort doing the task in Claude Code: every model request, reasoning summaries, every tool call and result, the final change and its grade), usable for SFT.
Difficulty and quality
- Hard tier: Claude Opus 5.5 at max effort succeeds in at most 1 of 4 attempts.
- Failures are the model’s, not the task’s: when the agent gets a task wrong, the cause lies in its own work, not in the request or the grader.
- Reference scores 1.0: every task comes with a reference solution that gets reward 1.0 under Harbor’s oracle agent, so you can check each task yourself.
Task types
The data covers eight task types. The right-hand column gives the closest problem category CursorBench lists.
| Task type | Closest CursorBench category |
|---|---|
| Production investigation and fix | investigation |
| Design-doc implementation | design adherence |
| Feature iteration | edit |
| Intent understanding | intent understanding |
| Code review | code review, bugfinding |
| Codebase Q&A | codebase understanding |
| Implementation planning | planning |
| Bug fix | bugfix |
What you get
tasks/ # Harbor tasks, one directory each
└── <task>/
├── instruction.md # the developer's request: the agent's only input
├── task.toml # task type, language, resources and time limits; agent offline
├── environment/
│ ├── Dockerfile # builds the offline image with the full toolchain
│ ├── repo.tar # the codebase at its starting commit
│ └── workspace/ # files that come with the task: logs, a design doc, a pending change
├── solution/ # reference solution or answer; solve.sh for the oracle agent
└── tests/ # hidden grader, never seen by the agent
├── test.sh # entry point: hidden tests, then the grading agent; writes the reward
├── groups/ # hidden tests
└── judge/ # rubric, grading-agent prompt, reference answer or solution
trajectories/ # Claude Opus 5.5's full trajectory, one per task
└── <task>/
├── traj/ # request-level API log: full context and response of each call
├── steps.jsonl # per step: reasoning summary, text, tool calls and results
├── final.patch # the agent's change
├── final_message.md # the agent's report to the developer
├── result.json # steps, tool calls, time, tokens
└── grade.json # test results, verdict and evidence per rubric item, quality scores
index.json # item overview
README.md # building, running and grading
Running with Harbor
# the reference solutions
harbor run -p tasks -a oracle
# your agent
harbor run -p tasks -a <agent> -m <model>
- Two kinds of task: in code tasks the agent changes the code and is graded by hidden fail-to-pass and regression tests, in some tasks alongside a rubric; in review, Q&A and planning tasks the agent answers without editing, and the rubric judges the answer against a reference.
- Grading: a task scores 1 only if every hidden test passes and every required rubric item holds; approaches the rubric lists as acceptable are not penalized.
- Quality scores: on tasks with a rubric, the grading agent also rates correctness, code quality, scope and communication from 1 to 5.
- Bundled solutions: each task can come with wrong and alternative solutions, each with the grader’s verdict.
- Isolation: the environment runs offline, and the agent never sees the grader or the reference.
Samples
Three tasks from the hard tier, different in task type, language and field: an end-to-end fix across several modules (JavaScript), cache cleanup under concurrent builds of mixed versions (Go), and a plan with no code changes (Java). Each card gives the developer’s request verbatim, what makes it hard and what the hidden grader checks; the third also shows the key moments of a trajectory and how it ended, with the full rubric and the agent’s final message folded underneath.
Sample 1 of 3
Fix the QA pipeline end to end: gate metrics, retry cap, Chrome probes, scan target
bkit: a Claude Code plugin in JavaScript (Node.js) that runs AI-assisted development as a PDCA cycle, with quality metrics and gates between phases and hooks such as Stop moving each feature along.
The developer lists the QA pipeline’s faults, asks for an end-to-end fix and names two functions to export, a new metric M16 (qaCriticalCount), a BKIT_CHROME_MCP switch and a QA retry limit. A correct result has the QA Stop hook read the pass rate, critical count and runtime errors from the assistant’s report into M11, M16 and M14, so the qa gate sends a clean run to Report and one with criticals back to Act; after a failed QA, finishing Act returns to QA and counts one retry, with Report reachable at the limit; a recorded Chrome probe or the switch gives one answer across processes, the Chrome bridge and QA state, and only L3–L5 are skipped without Chrome; phase Stop reports reach PDCA status, QA plans move to docs/05-qa/, and pre-release scans check the user’s project unless --root DIR or --self says otherwise.
Why it is hard
Each sentence is a symptom with its own cause, and three are easy to fix only halfway. Metrics: the QA Stop handler runs its regexes over the hook payload, which holds no report; under unified-stop.js the dispatcher has already drained stdin, so a fix that works only when the handler runs directly falls short; and user turns, thinking blocks and tool-call arguments in the transcript carry other pass rates, so only the assistant’s final reply counts. Adding M16 without fixing the read leaves the gate unmeasured, and relaxing the gate so clean runs pass lets runs with criticals through too. Retries: every Stop is a new process, so a failed QA that sent the feature to Act must be remembered across processes, or finishing Act goes back to Check and retries never reach the limit. Chrome: the state machine keeps its own detector that reads only MCP_SERVERS, so fixing the Chrome bridge alone leaves QA state saying unavailable and L3–L5 still skipped.
The developer’s request, verbatim
QA says "QA Phase completed" but metrics never reach the gate and clean runs can't reach Report. Retries loop and Chrome levels stay skipped. PDCA Stop reports aren't reflected in status; QA plans/runtime evidence are missing, and pre-release scans report on bkit instead of my project. Please fix this end to end. Expose readHookText and recordChromeProbe, add M16 (qaCriticalCount), BKIT_CHROME_MCP=1|0 and guardrails.loopBreaker.maxQaRetries (default 3). Plans should use docs/05-qa/{feature}.test-plan.md; scans should default to my project with --root DIR and --self overrides.
What the hidden grader checks
- The real Stop hook, run end to end for a QA turn, records the reported pass rate, critical count and runtime errors as M11, M16 and M14; the qa gate fails a run with criticals and passes a clean one.
- Only the numbers in the assistant's final reply count, not pass rates in user turns, thinking blocks or tool-call arguments, whether the handler runs directly or through unified-stop.
- A clean report sent through unified-stop's dispatch reaches the metric store, moves the feature to report with a passing gate result, and its values stay in status.
- The gate and the saved status follow the current report: a clean run after a failed one goes to report; a 0% pass rate or criticals after a clean one go back to act.
- Collecting M16 gives the gate a qaCriticalCount: a measured 0 passes the qa gate, a measured 2 still fails it.
- A failed QA moves to Act without counting; finishing Act in a new process returns to QA and counts one retry; Report opens exactly at the limit (configured or the default 3), and ordinary Act work still returns to Check.
- After a failed QA, the next Act completion returns to QA with a count of 1 and later ordinary Act completions do not; the object form of the QA_RETRY event also adds exactly 1.
- recordChromeProbe is exported, a probe recorded in one process is seen by later ones, BKIT_CHROME_MCP=1 turns detection on, and the QA phase then records Chrome as available.
- Within one process, setting BKIT_CHROME_MCP=1 or recording a successful probe makes detection report available at once, and the state machine's QA entry records chromeAvailable: true from it.
- Detection, the Chrome bridge, QA state and skipped levels agree; a failed probe and BKIT_CHROME_MCP=0 beat a registered server, and only L3–L5 are skipped when Chrome is unavailable.
- Pre-release scans default to CLAUDE_PROJECT_DIR, then the working directory, and report no bkit file; --root DIR scans the given directory and --self scans bkit itself.
- The 201 existing tests in 9 files (state machine, metrics, gates, Stop hook output schema and more) still pass and may not be weakened.
- Hidden fail-to-pass tests
- 40
- Hidden test groups
- 11
- Regression tests
- 201
- Files changed by the reference solution
- 20
- Reference lines added / removed
- +814 / −82
Sample 2 of 3
Let mixed werf versions share a WERF_HOME without wiping each other's live git cache
werf: a CI/CD command-line tool in Go that builds container images and deploys them to Kubernetes; it keeps git mirrors, worktrees, archives and patches in a local cache under WERF_HOME.
The developer reports that since shallow mirrors landed, concurrent werf 2.74.x and newer builds sharing one WERF_HOME on a CI runner fail mid-build because the bare repository at git_repos/5/<hash> is gone, and asks for mixed versions to coexist without cleanup deleting each other’s live git cache. A correct fix holds in both directions. When the newer version cleans git_repos, git_worktrees, git_archives and git_patches, it reclaims another version’s dir only once that dir is idle, judged by activity of the files inside. The newer version’s own cache survives a 2.74.x cleanup: every dir it leaves under git_repos/5 is a bare mirror 2.74.x can open directly, and shallow mirrors and the requires_full marker live outside git_repos. Pinned-commit builds keep a depth-one shallow mirror through one cleanup by each side and can still use it with the origin offline.
Why it is hard
The request is two sentences; what coexisting actually takes is for the agent to work out from the code. Making the newer cleanup skip other versions’ dirs is not enough, because idle ones must still be reclaimed, and four idle days count; judging by a version dir’s own mtime fails too, since fresh packs sit deep inside and a cache hit may rewrite only a metadata file. Fixing the newer cleanup is half the job: the released 2.74.x can’t change and still deletes every git_repos version dir except 5, so the newer version’s own cache has to survive it as well. Sharing git_repos/5 with 2.74.x means matching its layout exactly, each repository dir being the bare mirror itself, and working without a shared lock: a clone may not delete a peer’s in-progress temp dir, and when a peer publishes the mirror first, the clone may neither fail nor overwrite it but has to fetch its own branch into it.
The developer’s request, verbatim
Now that shallow mirrors are in, concurrent werf 2.74.x and newer builds sharing one WERF_HOME on a CI runner fail mid-build with `cannot open git bare tree ".../git_repos/5/<hash>": repository does not exist`. Please make mixed versions coexist without cleanup deleting each other's live git cache.
What the hidden grader checks
- A git_repos version dir another werf version still uses is kept even if its top-level dirs are 10 days old; one idle for 10 days is reclaimed.
- Use is judged by activity of the files inside, not by the version dir's own age; another version's dir idle for 4 days must still be reclaimed.
- Another version's live git_worktrees dir is kept too; a version dir idle for 30 days is removed whole, and the current version's own dir is exempt, however old.
- Likewise for git_archives and git_patches: a cache hit that rewrites only metadata counts as use, and the other version still hits that cache after cleanup.
- After one cleanup by each side, both sides' branch mirrors still work; with the origin offline, a pinned-commit build still uses its depth-one shallow mirror.
- The newer branch mirror survives a 2.74.x cleanup; when sharing the dir and a peer publishes its mirror first, the peer's mirror stays intact and its own branch still resolves.
- When sharing git_repos/5, a peer publishing its mirror mid-clone doesn't fail the clone, and the mirror ends up with both sides' branch refs.
- When sharing git_repos/5, a clone leaves a peer's in-progress <path>.tmp dir intact, for full and shallow mirrors alike.
- Every dir under git_repos/5 is a bare mirror 2.74.x opens directly, for branch mappings, tag mappings and both on one URL.
- Shallow mirrors and the requires_full marker live outside git_repos, which released versions wipe by cache version.
- The 59 existing tests (shallow mirrors and fetch options, git cache cleanup, host cleanup) still pass and may not be weakened.
- Hidden fail-to-pass tests
- 15
- Hidden test groups
- 10
- Regression tests
- 59
- Files changed by the reference solution
- 12
- Reference lines added / removed
- +473 / −105
Sample 3 of 3
Plan loopback-by-default binding with an explicit exposure opt-in
Floci: a local AWS emulator in Java (Quarkus) that serves AWS APIs on port 4566 and runs Lambda, EKS and other services in Docker containers.
The developer wants a plan, with no edits, for making Floci listen on loopback by default and refuse to start on any other address unless the user opts in. A correct plan adds a fatal pre-socket guard that no user setting can bypass, handles the TLS proxy’s hard-coded 0.0.0.0 and the TlsConfigSource pin, keeps all five Docker images and the entrypoint fallback reachable while saying who gives consent and what that means for Docker users, and covers docs and guard tests, never shipping the default flip ahead of the TLS, Docker and test-config changes.
Why it is hard
Flipping the default and adding a flag and a startup check is the obvious part. The plan also has to notice that the TLS proxy ignores the HTTP host setting and that a config source pins the effective host to the wrong value; that environment overrides still beat a new setting; that three Dockerfiles pass no host and the JVM fallback puts -D after -jar, where the JVM ignores it; and that the test profile would move to 127.0.0.1 and break localhost-signed tests. Then it has to order all of it so the flip never ships first.
The developer’s request, verbatim
Floci listens on 0.0.0.0 out of the box, so anyone who can reach the machine can call its APIs. I want it to default to loopback and refuse to start on any other address unless the user explicitly opts in. Before you change anything, give me a plan: which pieces have to change, in what order, and what this could break for people running it today. Don't edit any files yet.
What the hidden grader checks
- Loopback is the default and a separate opt-in, off by default, gates exposure; QUARKUS_HTTP_HOST=0.0.0.0 or -D overrides can't bypass it.
- A fatal check runs before Quarkus opens its HTTP socket and refuses wildcards, LAN IPs and non-loopback hostnames unless the opt-in is set.
- The plan names TlsProxyServer's hard-coded 0.0.0.0 on the public TLS port, has it bind the configured host, and checks consent before it listens.
- In TLS mode TlsConfigSource pins quarkus.http.host to 127.0.0.1, so the proxy and its check must use the user's host, not the effective value.
- All five Docker images and the entrypoint fallback still bind a non-loopback host with consent; the plan says who consents and what follows.
- Detecting a container may pick the default host but never grants consent: in host-network containers 0.0.0.0 is every host interface.
Key moments of the trajectory
Steps 1–5 Grepped for wildcard binds and server-creating calls and found Quarkus’s 0.0.0.0 in application.yml is one of many listeners, alongside the TLS proxy, Lambda runtime API, DNS, IMDS, auth proxies and MQTT.
Steps 5–8 In the TLS code, TlsProxyServer serves the public port on a hard-coded 0.0.0.0 and TlsConfigSource pins quarkus.http.host to 127.0.0.1 at ordinal 300, which the native image’s -Dquarkus.http.host=0.0.0.0 outranks, exposing the internal ports.
Steps 9, 11, 14, 16 Traced container networking: on native Linux, Lambda containers call back via host.docker.internal, and containers Floci launches (web console, EKS, OpenSearch) publish ports on every host interface, which the agent scoped as a separate decision.
Steps 21, 24–25, 51 Read the host-validation config metadata in the Quarkus 3.39.2 vertx-http jar: a loopback host would enable Quarkus’s Host-header filter, so Floci’s require-localhost: false must stay to keep virtual-hosted S3 working.
Steps 26, 28–29, 31 The test application.yml sets no HTTP host; disassembling SmallRye’s loader confirmed both YAML files load, so tests run on 0.0.0.0 today and the flip would break Docker tests calling back via host.docker.internal.
Steps 42–43 Unpacked VertxHttpProcessor from the Quarkus 3.39.2 jar and confirmed openSocket depends on ApplicationStartBuildItem: the HTTP socket opens only after StartupEvent observers run, and a failing observer stops Quarkus from binding.
Step 51 Final message: three ordered stages, adding floci.bind-address and an opt-in with ENV consent in all five images before flipping the default to 127.0.0.1, and warning that -p 4566:4566 still exposes every host interface.
Result
- Agent steps
- 51
- Tool calls
- 75
- Minutes
- 18
The agent edited nothing and delivered a three-stage plan: add floci.bind-address and floci.allow-non-loopback-bind with ENV consent in all five Dockerfiles, then flip the default to 127.0.0.1 behind a StartupEvent guard that runs before any socket opens, and handle container port publishing separately. The guard checks the effective quarkus.http.host as well as the new setting, so QUARKUS_HTTP_HOST=0.0.0.0 cannot skip consent, and routing TlsProxyServer through floci.bind-address makes the proxy immune to the TlsConfigSource pin. The grader marked verification as the weak spot: no TLS proxy bind or refuse tests, no image smoke test, and no note that docker/test-entrypoint.sh asserts the -D flag the plan removes.
Quality scores from the grader (1–5)
- Correctness
- 4
- Scope
- 5
- Communication
- 4
Rubric items (20)
Required (12)
- C1 · The plan makes loopback the default bind address of Floci's API listener. It adds a separate, explicit opt-in that is off by default and is what the startup guard enforces. The opt-in can take any form: a boolean, an allowlist of exposed addresses, or an enum. The bind address may stay quarkus.http.host / QUARKUS_HTTP_HOST (flipping src/main/resources/application.yml:15), or be a new Floci-owned setting that feeds it. Either way, no user setting can bypass the consent: the guard checks the host that actually takes effect, so QUARKUS_HTTP_HOST=0.0.0.0 or -Dquarkus.http.host=0.0.0.0 is refused without the opt-in.
- C2 · The plan adds a startup check that aborts boot when the bind host is not loopback and the opt-in is off. Loopback covers at least 127.0.0.1 (ideally 127.0.0.0/8), ::1 and localhost. Every other address needs the opt-in: the wildcards 0.0.0.0/::, specific LAN or bridge IPs, and other hostnames. The check runs before Quarkus opens its HTTP socket.
- C3 · The plan finds that in TLS mode the public port is served by TlsProxyServer, which binds a hard-coded 0.0.0.0 (TlsProxyServer.java:106-109) on floci.port and on floci.tls.aws-https-port. So flipping quarkus.http.host alone leaves TLS mode listening on every interface. The plan has the proxy bind the configured host, and the consent check covers it before it starts listening.
- C4 · The plan handles TLS mode's config pin. TlsConfigSource puts quarkus.http.host=127.0.0.1, for the internal 4510/4511 backends, into a config source with ordinal 300 (TlsConfigSource.java:146). So in TLS mode the effective quarkus.http.host is that pin, not the user's value. The host the public TLS listener binds, and the consent check that protects that listener, must come from the user-configured host, never from the effective quarkus.http.host. Otherwise that check never refuses in TLS mode, and the proxy binds loopback even when the user asked for 0.0.0.0.
- C5 · The plan keeps every published Docker image and the entrypoint fallback working, and it tells the developer who gives the consent for container users and what follows from that. Inside a container a loopback-only listener is unreachable. A published port (docker run -p 4566:4566) cannot reach it, and neither can the containers Floci launches, which reach it by its container IP. So all five published images (docker/Dockerfile, Dockerfile.jvm-package, Dockerfile.native, Dockerfile.native-package, Dockerfile.compat) and the entrypoint's empty-argv fallback (docker/entrypoint.sh:76-82) need a non-loopback host plus consent. Either path is fine, as long as its consequence is stated: (1) the images supply the consent. Docker users then never opt in themselves, and they stay as exposed as their -p publish makes them: -p 4566:4566 publishes on every host interface; (2) the users supply it. Existing Docker setups then break until they add the opt-in, so the plan says who breaks and how they migrate.
- C6 · Under the plan's design, the entrypoint's empty-argv fallback (used by Testcontainers' LocalStackContainer) starts Floci with the host and the opt-in actually reaching the JVM. The opt-in comes from the image, or from the user under a user-supplied-consent design. The fallback's JVM branch today (docker/entrypoint.sh:80) is java -jar /app/quarkus-app/quarkus-run.jar -Dquarkus.http.host=0.0.0.0. A -D after -jar is a program argument the JVM never applies. It only worked because the yml default was 0.0.0.0.
- C8 · The plan accounts for the test profile. src/test/resources/application.yml sets no quarkus.http.host, so the suite inherits the main default. Quarkus derives the RestAssured URL from quarkus.http.host and maps only 0.0.0.0 to localhost. With a 127.0.0.1 default the test authority becomes 127.0.0.1, which breaks tests whose SigV4 signature covers localhost:<port>. A loopback test listener also refuses the Docker-backed tests whose containers call Floci back. The plan keeps the suite working. Typically it sets the test listener to 0.0.0.0 with the opt-in, as a test-only exception.
- C9 · The plan includes documentation work for the changed default bind address and the new opt-in.
- C10 · The plan includes automated tests for the startup check, so the behaviour the developer asked for is verifiable: a loopback host starts, a non-loopback host is refused without the opt-in, and the same host is allowed with it.
- C11 · The agent does not modify the repository: no source, config, Docker, docs or test file is changed, added or deleted. The developer asked for a plan only.
- C12 · The plan's statements about the current code and its configuration precedence are accurate. In particular, it does not claim any of the following: (1) TLS mode already honours QUARKUS_HTTP_HOST or already listens only on loopback; (2) QUARKUS_HTTP_HOST or application.yml override the TlsConfigSource pin; (3) an env var (-e) overrides a -D system property; (4) a -D placed after -jar sets a system property, or the entrypoint fallback already passes the host to the JVM; (5) every image already passes -Dquarkus.http.host=0.0.0.0; (6) Floci has no bind-address setting, or no GATEWAY_LISTEN mapping; (7) the test profile sets its own host, or is unaffected by a 127.0.0.1 default. With a localhost test listener, 'the whole suite is unaffected' is also false, because of the CA-bundle profile and the Docker callback tests.
- C13 · The plan answers 'in what order'. It states an order for the work, and the default flip does not land before the TLS proxy fix, the image consent and the test-profile change.
Quality (8)
- C7 · The plan considers the LocalStack shim. docker/localstack-parity.sh:22-23 maps GATEWAY_LISTEN to QUARKUS_HTTP_HOST, and LocalStack binds there without any opt-in. Under the plan's design, either GATEWAY_LISTEN users are not refused, or the plan says they now need the opt-in too. An explicitly set Floci variable still wins (the shim's 'Floci vars always win' rule). The GATEWAY_LISTEN row in docs/getting-started/migrate-from-localstack.md reflects the behaviour.
- C14 · The plan follows Floci conventions: (1) the opt-in is config under floci.* with its FLOCI_* env var, declared in EmulatorConfig with @WithDefault, and in the main application.yml (and the test yml where needed). A boolean is the simplest form; an allowlist is fine; (2) quarkus.http.host kept as the one bind setting. A Floci alias that feeds it adds a second name for the same thing, a small cost at most; (3) the guard at the earliest startup priority (@Priority(Interceptor.Priority.PLATFORM_BEFORE)), or the proxy self-checking; (4) a fatal IllegalStateException like the existing boot validators. Its message names the opt-in (property or env var) and/or the host setting, so the user knows what to change; (5) a defaults test following the ApplicationDefaultsTest pattern (yml value plus @WithDefault); (6) quarkus.http.host-validation.require-localhost: false kept. It matters more now: Quarkus enables Host-header validation whenever it is bound to loopback, which becomes the default; (7) no dead code left in the Docker scripts, such as a -D after -jar that the design does not need.
- C15 · The plan's design never hands an unknown -Dfloci.* system property to the possibly older binary inside docker/Dockerfile.compat. That image builds from BASE_IMAGE=floci/floci:${VERSION}, and the compatibility workflow uses VERSION=latest. An older binary refuses to boot on an unknown -Dfloci.* property (SRCFG00050) but ignores unknown env vars.
- C16 · The plan calls out that a Floci run directly on a Linux host needs a non-loopback bind when its services start containers (Lambda, ECS). Those containers reach it through host.docker.internal, i.e. the docker bridge gateway. The plan documents the opt-in plus firewalling for that setup.
- C17 · The plan treats Floci's other listeners deliberately. Several components bind every interface on their own: (1) the Lambda Runtime API (RuntimeApiServer.java:568), embedded DNS, the ELBv2 data plane and the MWAA proxy; (2) IMDS and the database/cache auth proxies, which name no host; (3) IoT MQTT, through its own floci.services.iot.mqtt.host. The plan may keep this change to the API listener (quarkus.http.host and the TLS proxy) and list the others as follow-ups. Or it may route them through the same setting and state the consequence: containers Floci launches (Lambda, ECS, EC2/EKS) reach them over the docker bridge, so a Floci running on the host then needs the non-loopback bind plus the opt-in for Docker-backed features.
- C18 · Inside the images, explicit user settings still win over the new image defaults. A user-set QUARKUS_HTTP_HOST must still apply, e.g. --network host -e QUARKUS_HTTP_HOST=127.0.0.1. So must an explicit opt-out -e FLOCI_..=false. Image ENV lines and ${VAR:-default} entrypoint exports satisfy this, since -e overrides image ENV. The same holds for a new Floci bind setting that the images set.
- ✗C19 · The plan says how to verify the change beyond the guard: (1) TLS proxy tests. The proxy binds the configured host, not every interface. It is refused without the opt-in, tested either in the proxy's own test or, when the check lives in a pre-proxy guard, by a TLS-mode boot test: a non-loopback host without the opt-in fails startup, and with the opt-in the proxy listens on the configured host; (2) a test that the host is resolved past the TLS pin, and updates to the tests that construct the proxy directly; (3) a sample of localhost-signed integration tests, and a Docker callback test run where Docker is available; (4) the docker/test-*.sh scripts, which CI does not run; (5) an image smoke test.
- C20 · The plan surfaces who consents inside the containers as a decision for the developer. It weighs image-level consent against user-supplied consent, and any other option it considers, and recommends one with its reasons. Relevant considerations: (1) image-level consent keeps docker run, compose and Testcontainers users working, but they never opt in, and their -p exposure is unchanged; (2) user-supplied consent is the literal reading of the request, but it breaks every existing container setup; (3) the in-container opt-in cannot see the host-side publish either way.
The agent’s final message
I haven't changed anything. Changing the one quarkus.http.host: 0.0.0.0 line in application.yml would leave most of Floci on all interfaces, so this needs three changes in a set order. The plan is below; I recommend splitting it into three PRs.
Why one setting isn't enough
Floci opens 12 kinds of listener, and the Quarkus API port is only one of them:
- Five hardcode
"0.0.0.0":TlsProxyServer(4566 and 443),RuntimeApiServer(Lambda),EmbeddedDnsServer,MwaaWebProxy,ElbV2DataPlane. - Five bind every interface because they don't name an address:
Ec2MetadataServer(it serves role credentials),AbstractRedisAuthProxy(ElastiCache and MemoryDB),RdsAuthProxy,RedshiftAuthProxy,NeptuneGremlinProxy. - IoT MQTT has its own setting,
floci.services.iot.mqtt.host, which defaults to0.0.0.0.
Separately, Floci asks Docker to publish ports for containers it launches (the web console, EKS, OpenSearch, Amazon MQ and others) on every host interface. No bind setting affects those.
The decision everything depends on: the Docker images
Inside a container, a loopback-only server can't be reached. -p forwards to the container's own network interface, and Lambda or ECS containers connect over the Docker network. The failure is also silent, because the image's health check connects to 127.0.0.1 from inside the container and keeps reporting healthy.
Recommendation: the images opt in explicitly through ENV, and the loopback default applies to the JAR, the native binary and dev mode. If every Docker user had to opt in, every docker run, every compose file and the Testcontainers modules (separate repos) would break. Nobody would be safer either, because the opt-in can't see the host side, where -p 4566:4566 publishes on all interfaces. Only our own examples can fix that half, by switching to -p 127.0.0.1:4566:4566.
Plan
PR 1: one bind setting, no change in behavior
- Config: add
floci.bind-address(FLOCI_BIND_ADDRESS) andfloci.allow-non-loopback-bind(FLOCI_ALLOW_NON_LOOPBACK_BIND) toEmulatorConfigand both YAML files. The default stays0.0.0.0for now. Setquarkus.http.host: ${floci.bind-address}, the same pattern asport: ${floci.port}, and make the MQTT host default follow it. - Listeners: send all ten listeners above through the new setting. Smaller fixes alongside:
IotMqttWebSocketBridgeneeds to handle::as well as0.0.0.0.- The
EmulatorLifecyclestartup log always prints0.0.0.0; it should print the real address.
- Images: add both
ENVlines to all five Dockerfiles.Dockerfile.compatdoesn't inherit them, because its final stage starts fromubi9-minimal. Remove-Dquarkus.http.host=0.0.0.0from the native and compat CMDs and from the no-argument fallback inentrypoint.sh, which is the Testcontainers path.- This also fixes an existing leak. That
-Dflag outranks the TLS config source, so in the native image with TLS on, the internal ports 4510 and 4511 listen on every interface today.
- This also fixes an existing leak. That
- LocalStack parity: map
GATEWAY_LISTENtoFLOCI_BIND_ADDRESSusing only the host part. Today a LocalStack-style value such as0.0.0.0:4566is copied unchanged intoQUARKUS_HTTP_HOST. - Test config: set
0.0.0.0plus the opt-in explicitly, with a comment explaining why.- Both
application.ymlfiles load during tests, so the suite already runs on0.0.0.0. Without the explicit setting, the flip in PR 2 would quietly move it to loopback. - That breaks Docker tests whose containers call back through
host.docker.internalon Linux CI: the Lambda execution-role, EKS IMDS and CA-bundle tests.
- Both
PR 2: change the default and add the startup check (breaking change)
- Default:
127.0.0.1. - Startup check: a
StartupEventobserver with an explicit priority so it runs before the beans that bind sockets as they start (TlsProxyServer,EmbeddedDnsServer).- Quarkus opens its own socket only after startup observers finish; I confirmed that ordering in the 3.39.2 jar. So Floci can refuse to start before any port is open.
- The check belongs in its own observer, not in
EmulatorLifecycle.onStart, which can run after those beans. - It checks three values: the effective bind address, the effective
quarkus.http.host(to catch leftover overrides), and the MQTT host. - Loopback means 127.0.0.0/8,
::1, or a hostname that resolves only to loopback addresses. - When it refuses, the error names the setting and both ways to fix it.
- If Floci is in a container and bound to loopback, it logs a loud warning.
QUARKUS_HTTP_HOST: treat it as a deprecated alias for the new setting, so the API port can't drift from the other listeners.- Host-header check: keep
host-validation.require-localhost: false. Its comment says Quarkus never enables the filter outside TLS mode, which stops being true once the default is loopback. Removing the setting would reject virtual-hosted S3 and*.localhost.floci.iohostnames. - Lambda timeout hint:
DockerHostResolveralready logs a UFW hint for Lambda timeouts on Linux. A loopback bind causes the sameFunction.TimedOut, so the hint should mention it. - Tests: unit tests for the startup check, plus one test profile that starts with the defaults and asserts loopback only.
- Docs: reference pages, the README's "Lambda on native Linux Docker" section, the repo's
docker-compose.yml, and the 25 files whose examples use4566:4566, switched to127.0.0.1:4566:4566. - Release: use a
BREAKING CHANGE:footer. With semantic-release's default preset that releases 3.0.0, and as far as I know that preset ignoresfeat!:.
PR 3: Docker-published container ports (separate, your call)
- The exposure: these containers are published on all host interfaces even when Floci itself runs in Docker:
- the web console (4500), EKS, OpenSearch and Amazon MQ
- SageMaker endpoints, EC2 SSH and port-forward, ECS host-port mappings
- MSK and Karapace, when Floci runs on the host
- Console risk: the console container is given Floci's endpoint and credentials, so it may be a back door to the API.
- Mechanism: a loopback-only binding already exists (
withLoopbackPortBinding, used by ECR). - Setting: it needs its own setting, because the image's opt-in only means "listen on all interfaces inside the container".
- Side effect: ECS
networkBindings[].bindIPwould then report127.0.0.1. - Cheap extra: Floci already inspects its own container (
CurrentContainerNetworkResolver), so it could warn when 4566 is published on all host interfaces.
What this could break
Docker image users (docker run, compose, Testcontainers, CI service containers): nothing, as long as the images opt in. Their exposure stays the same until they publish on 127.0.0.1. floci-cli is in another repo: if it runs the image it's unaffected, but if it launches the binary on the host it falls into the next group. Worth checking before PR 2.
JAR, native binary or quarkus:dev running on the host:
- Remote access: other machines, VMs and devices get "connection refused" until the user opts in. That's intended, but it needs a release note.
- Docker-backed features on Linux: Lambda, ECS, CodeBuild, EC2/EKS IMDS, CloudFormation custom resources and the console all break.
- Why: the containers reach Floci through the docker0 bridge, not loopback. Lambda times out; the others hang or fail.
- Fix in this plan: bind
0.0.0.0and opt in. A follow-up could allow a list of addresses (loopback plus docker0), but Quarkus binds only one host. - Docker Desktop: on macOS and Windows I expect it to keep working, but I haven't tested it.
- WSL2: tools running on the Windows side lose access. Quarkus's own documentation makes WSL an exception to its localhost default for this reason.
- IPv6
localhost: today's all-interfaces bind also accepts IPv6, so clients that resolvelocalhostto::1work. With127.0.0.1, clients that don't fall back to IPv4 (older Node.js is the usual case) get refused. That includes clients following thelocalhostURLs Floci returns, such as SQS QueueUrl. - macOS port clashes: a local service on 127.0.0.1:6379, such as Homebrew Redis, currently grabs
localhost:6379traffic without anyone noticing. After the change, Floci's proxy fails to bind when the cache is created.
Explicit non-loopback settings (QUARKUS_HTTP_HOST, -Dquarkus.http.host, GATEWAY_LISTEN, the MQTT host) outside our images: Floci refuses to start until the user opts in. That's intended.
Custom images or Kubernetes manifests that run the JAR without our ENV: they start but can't be reached, and health checks stay green. The in-container warning is their only signal.
Not covered: loopback doesn't stop other local users or a malicious web page. CORS allows no origins by default, but that only stops a page from reading responses. It doesn't stop form POSTs to Query-protocol APIs, or DNS rebinding while the Host-header check is off.
Decisions for you
- Docker images: opt in inside the image (my recommendation), or require every Docker user to opt in.
- PR 3: I'd do it right after PR 2, with its own setting.
- Setting names: the two above are a proposal. Whatever we pick has to stay clearly separate from
floci.hostname, which is the advertised name. - Version: release this as 3.0.0, or treat it as a minor version.
Customization
Including, but not limited to, the following; anything else is open for discussion.
- Task types and mix: features, bug fixes, production investigations, refactors, design-doc implementation, intent understanding, code review, codebase Q&A, planning, long-running jobs.
- Languages and codebases: languages and stacks, codebase size (monorepos included), size of the change.
- Difficulty: the reference model and the pass-rate band to hit.
- Requests: length and tone, pasted logs, errors and file references; multi-turn sessions.
- Format: Harbor tasks, trajectories or both; the agent harness and model for the trajectories.
- Volume and schedule: how many and by when.