Repository navigation
feat(net): reject UDP to port 443 where a box's QUIC stance is blocked - #2513
norrietaylor merged 7 commits into
Conversation
BEP-018: the stance is blocked iff the value is block, or auto with a credentialed upstream under dns or both steering.
BEP-018: the box relay answers UDP 443 with ICMP port unreachable while the box's resolved stance is blocked, and toward the Box Egress Proxy address in every stance. The gate resolves the auto stance from the policy's credentialed lane; with_quic443 takes a declared one. Each rejection writes a rate-limited debug line with box and destination.
BEP-018: CohortQuic443 holds each resident member's resolved stance and blocks UDP 443 for the cohort when any member blocks. The cohort table and launch wiring that enforce it are not in this change.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Reviewed: no findings; approval withheld, 1 thread unresolved at APPROVE withheld: 1 unresolved thread — minimal-arch[bot] crates/minimald/src/net/classifier.rs:538. Resolving the last thread releases the approval on this head. Resolve the open threads. Resolving the last one releases the approval on this head; no new review is required. Clobber: none seen. |
There was a problem hiding this comment.
arch-review: CONDITIONS · 2 conditions · the full ruling
The relay rejects UDP 443 with an ICMP port unreachable, and the steered-proxy reject holds in every stance. Two gaps remain. First, the gate resolves only auto. A declared block or allow never reaches it, because BoxPolicy does not carry quic443. Section 5.3 line 150 says block and allow override auto. Make the change in C1. Second, nothing calls CohortQuic443, so the host_ip cohort block is not enforced, and the PR still closes #2282. File the issue and change the PR body as C2 says.
Ruled at 889893c against gominimal/arch@109541a48c31 by claude-opus-5-5.
|
Round 1 of 10 on the runtime's review findings: the coder changed nothing. Revise round 1: no code change. The two review findings are correct about the gaps, but each fix needs files outside this task's layers. (1) The declared quic443 stance does not reach the daemon. mfile parses [session.network] quic443, but boxes::CredentialedUpstream (crates/boxes/src/lib.rs) has no quic443 field. So the gate holds the auto stance in production, and with_quic443 has only test callers. The fix needs a quic443 field on the policy wire type in crates/boxes/src/lib.rs, the client path that fills it, and a call where crates/minimald/src/net/gvproxy_network.rs builds the gate. (2) CohortQuic443 is a model with no production caller. The host_ip verdict comes from a fixed nftables table that the privileged step installs (classifier.rs module docs: nothing is edited at box launch). Enforcement needs that ruleset and the host_ip launch and stop path to join and leave the cohort. The spec's first slice lists host_ip cohort handling as a later slice. Both need a follow…[truncated] Review threads the coder judged:
|
|
/revise Carry the declared quic443 stance into the gate (arch C1 on review 5636951737's successor at 889893c, threads 4366097285 and 4366097287; minimal-review thread 4366096691). The task's layers were too narrow for spec §5.3 line 150, so #2282 now has a policy layer naming the files:
Arch C2 (thread 4366097289, the unenforced Generated by Claude Code |
CredentialedUpstream carries the [session.network] quic443 stance from the client to the daemon, and BoxGate::for_session resolves it, so a declared block or allow overrides auto (BEP-018, spec section 5.3). The set_quic443 test hook is now test-only. CohortQuic443 says it is not enforced yet (#2515).
There was a problem hiding this comment.
arch-review: CONDITIONS · 1 condition · the full ruling
The declared quic443 stance now reaches the gate, but only for a box with a credentialed lane. A box with no broker grant that declares block still sends UDP to port 443, because credentialed_upstream_for returns None and the stance is lost. Section 5.3 says block and allow override, and section 5.4 makes quic443 a [network] field of every box. Move the stance to BoxPolicy as C1 says. The cohort enforcement can stay open as residual #2515.
Ruled at 35b0b48 against gominimal/arch@109541a48c31 by claude-opus-5-5.
|
Round 2 of 10 on a /revise note, pushed as
Verify Review threads the coder judged:
A dns-steered grant box's UDP to port 443 gets an immediate ICMP port unreachable. A box that declares quic443 = "block" in [session.network] gets the same reject, and one that declares "allow" sends QUIC. The stance now comes from the box's own policy and not from a test hook. Notes from the agent: gvproxy_network.rs is not changed. BoxGate::for_session now reads the declared stance from policy.credentialed_upstream.quic443 (policy.quic443.unwrap_or_default().blocks(..)), so the gate that gvproxy_network.rs builds at line 307 takes the declared stance with no change at that call site, and so does every other caller. with_quic443 is removed because it had no caller. set_quic443 is now #[cfg(test)], and so is the quic443_facts field it reads. Residual: the stance travels on CredentialedUpstream, so a box with no credentialed lane (no broker grant and no --credentialed-upstream flag) that declares quic443 = "block" still gets no reject at the daemon. Its policy carries no upstream to hold the stance. The arch note asked for this placement, but spec section 5.3 says block always blocks. A follow-up must carry the stance outside the lane. The cargo-deny failure is a RustSEC advisory on the russh dependency tree (ecdsa/primeorder). The fix is in deny.toml or Cargo.lock, outside this task's layers, so it is not addressed here. ci-success fails only because of that cargo-deny failure. I did not run just ci or a workspace build. |
|
/revise Arch C1 at 35b0b48 (review threads 4366213191, 4366213192, 4366213193; minimal-review thread 4366211977): the declared quic443 stance reaches the gate only for a box with a credentialed lane, because
Arch C2 (cohort enforcement) stays held on #2515. The task's policy layer on #2282 already names lib.rs, create.rs and gvproxy_network.rs. Generated by Claude Code |
RFC 1122 forbids an ICMP error for a datagram to a multicast or broadcast address, and the reply would carry the group address as its source. refuse_udp_443 now passes such datagrams to the egress verdict.
There was a problem hiding this comment.
arch-review: CONDITIONS · 1 condition · the full ruling
The relay rejects UDP 443 correctly for a box whose stance resolves to blocked, and to the proxy address in every stance. But a box with no broker grant loses its declared quic443 = "block", because the stance rides only CredentialedUpstream. Section 5.3 line 150 says block and allow override auto. The test leg for a declared block with no lane passes only through the test hook set_quic443. Make the change in C1: carry the stance on BoxPolicy and prove it without the hook. The host_ip cohort enforcement stays open as #2515.
Ruled at 0a055eb against gominimal/arch@109541a48c31 by claude-opus-5-5.
|
Round 3 of 10 on a /revise note, pushed as
Verify Review threads the coder judged:
A dns-steered grant box that sends QUIC to port 443 gets an immediate ICMP port unreachable. A datagram to a multicast or broadcast address gets no ICMP answer. A grant-less box that declares quic443 = "block" still sends UDP 443, because the C1 move is not done in this round (see notes). Notes from the agent: This round fixed the multicast and broadcast finding only. refuse_udp_443 now skips a datagram to an IPv4 multicast address, to 255.255.255.255, or in a frame with the group bit set in the destination MAC. It does not detect a subnet-directed broadcast, because the gate does not know the subnet. The arch C1 move (quic443 from CredentialedUpstream to BoxPolicy) is NOT done. BoxPolicy has no default for a new field in a struct literal, so the move breaks about 37 BoxPolicy literals in files outside the task's layers: crates/minimald-rpc/src/tests.rs, crates/minimald/src/box_actor/setup.rs, crates/minimald/src/box_actor/tests.rs, crates/minimald/src/box_manager/tests.rs, crates/minimald/src/box_runtime.rs, crates/minimald/src/net/dns_gate.rs, crates/minimald/src/net/listeners.rs, crates/minimald/src/net/proxy.rs, crates/minimald/src/rpc/tests.rs, crates/minimald/tests/netns_root_integration.rs, crates/minimal/src/cmd/boxes/attach.rs, crates/minimal/src/cmd/boxes/vm_host.rs, crates/minimal/src/dash/render.rs, crates/minimal/src/dash/rpc.rs, crates/minvmd/tests/guest_classifier_integration.rs, crates/minvmd/tests/vm_escape_integration.rs. Each needs |
|
/revise Arch C1 stands at 0a055eb (review threads 4366276496, 4366276497, 4366276498, 4366276499): round 3 added the multicast skip but left the declared stance on
Also minimal-review thread 4366276143 (LOW): the PR title and body say the Generated by Claude Code |
A box with no broker grant and no --credentialed-upstream flag has no CredentialedUpstream, so a declared `quic443 = "block"` was lost before it reached the gate (BEP-018, spec section 5.3). The stance now rides BoxPolicy for every box. activate_box fills it from `[session.network] quic443`, effective_session_policy carries it verbatim, and BoxGate::for_session resolves it against the lane's grants and steering. The set_quic443 test hook is gone. The tests build the gate from a declared policy, a lane-less `block` box among them. The other BoxPolicy literals gain `quic443: None`.
There was a problem hiding this comment.
arch-review: PASS_WITH_CONDITIONS · 1 condition · the full ruling
The compare fixes the open item from the last round. The declared quic443 stance now rides BoxPolicy, so a box with no credentialed upstream that declares block rejects UDP 443. Section 5.4 makes quic443 a setting of every box, and the gate now reads it that way. The host_ip cohort rule of section 5.3 is still not enforced. C1 tracks it, and it can stay open as residual #2515. Also update notes 1 and 2 in the PR body, because they describe an earlier head.
Ruled at dcc3e39 against gominimal/arch@109541a48c31 by claude-opus-5-5.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 12 unresolved threads — minimal-arch[bot] crates/minimald/src/net/switch.rs, minimal-arch[bot] crates/minimald/src/net/switch.rs, minimal-arch[bot] crates/minimald/src/net/classifier.rs:538, minimal-arch[bot] crates/boxes/src/lib.rs, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs, …. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
|
Round 4 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
A box with a dns-steered broker grant gets an immediate ICMP port unreachable when it sends UDP to port 443. A box that declares Notes from the agent: Revise round 4 makes the four edits in the /revise note. Files outside the layers, all touched on purpose:
|
There was a problem hiding this comment.
minimal-review — approved
Verdict APPROVE — every review thread is resolved; @norrietaylor closed the last one. The review of dcc3e39b3827 withheld this approval on the threads open then. Posted as a comment: the App cannot approve its own pull request; the check and the label carry it.
There was a problem hiding this comment.
arch-review: PASS_WITH_CONDITIONS · 1 condition · the full ruling
The merge from main does not touch this change. So the ruling on dcc3e39b stands for this head. The per-box quic443 gate and the steered-address reject conform to §5.3 line 150. The host_ip cohort stance is decided in CohortQuic443 but no rule enforces it. C1 closes that gap, and #2515 tracks it. The change can merge with C1 open.
Ruled at 4c69aad against gominimal/arch@109541a48c31 by claude-opus-5-5.
norrietaylor
left a comment
There was a problem hiding this comment.
Babysitter approval at 4c69aad: every merge gate passes at this head (arch PASS, zero open threads, every lane aggregator green, bot resolutions re-verified). Squash title feat(net): reject UDP to port 443 where a box's QUIC stance is blocked and the squashed message pass commitlint. Queued for squash merge.
Generated by Claude Code
…(0.7.0 backport) (#2742) * fix(minimal): hold the answerer channel socket owner-only (#2297) * fix(minimal,minvmd): hold the answerer channel socket owner-only The box-zone answerer's channel socket was world-connectable: the launchd plist bound it SockPathMode 0666 and the systemd socket unit SocketMode=0666, leaving the peer-uid gate the only check on who may connect. Both units now bind it owner-only -- SockPathOwner the operator, SockPathMode 0600 on launchd; SocketUser the operator, SocketMode=0600 on systemd -- with the uid gate kept as defence in depth. An install whose socket node carries group or other bits -- one that predates the mode, or a hand that relaxed it -- now fails custody through a channel_mode fact, so the advisory re-surfaces and a step re-run re-binds the socket. The accept loop's foreign-refusal warn is rate-limited to a few lines a second, so a connect storm cannot flood the log; the refusals themselves are never limited. * fix(minimal,minimald,minvmd): name the other account on a refused channel connect A daemon whose connect the owner-only channel socket refuses now says the host's DNS service belongs to another account, not a bare Permission denied. The answerer step needs the operator's account to resolve, with no stand-in uid, and custody fails a channel socket the operator does not own. * fix(minimal,minvmd): leave another operator's DNS service alone A channel socket owned by another existing, non-root account is that operator's service: the answerer step is now unavailable with the same sentence the daemons say on a refused connect, instead of a custody failure whose step would reinstall the unit and take the service over. A root-owned socket, or one whose uid names no account, still fails custody so the step re-binds it. The minvmd tests that take the process-global foreign-refusal slots now run one at a time and start and end with every slot free, and the warn-rate test bounds the burst at two windows' worth of lines, so a slow runner that spreads the burst does not fail it. * fix(minimal): offer the step over a socket another account left behind A channel socket another account owns refuses the answerer step only when a service is installed; with none, the step's install removes the leftover socket before it loads the unit, so it is offered. --------- Co-authored-by: gominimal-aw-bot[bot] <281738952+gominimal-aw-bot[bot]@users.noreply.github.com> (cherry picked from commit 746770d) * fix(net): refuse out-of-zone names at a guest deny-subtree DNS listener (#2300) * fix(net): refuse out-of-zone names at a guest deny-subtree DNS listener A deny-all host-address box on a VM-backed guest resolved out-of-zone names at the switch gateway: the interim NET-079 carve-out admitted the gateway's port 53 whole, UDP and TCP, so a box that admits no destination could still ask a resolver beyond the machine — and DNS over TCP could retry past the verdict. The guest's deny subtree now steers its UDP-53 lookups onto a loopback listener on the answerer's port (NET-141 slice 2): deny_out admits the listener beside the reply direction, the dstnat match carries no destination address (the box asks the gateway like every other host-address box; the steer is the carve-out), and the listener itself answers REFUSED for every name outside the box zone — apex and a non-lowercase zone suffix among them — NODATA for an in-zone non-A question, and forwards the zone's A questions to the switch gateway alone. DNS over TCP is neither steered nor admitted. The guest daemon starts the listener after its classifier table loads; the daemon's own lookups are untouched (cgroup-keyed match, deny path only). The interim --gateway-resolver installer flag and every test, digest and pin that spelled the interim carve-out follow the new shape. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(net): bound and pin the guest DNS listener's forwards Connect each forward socket to the gateway so a datagram from any other sender is dropped, cap forwards in flight so a flood cannot exhaust the daemon's descriptors, and drop the needless to_string calls clippy rejects in the guest classifier integration test. * fix(net): refuse questionless and non-QUERY messages at the guest DNS listener decide() forwarded a message with no question, and an UPDATE or NOTIFY whose zone section named an in-zone A, because every per-question check passed vacuously. Answer the first REFUSED and the rest NOTIMP, so the forward path carries only standard lookups. Bind the listener directly so its log does not read as the box-zone answerer, pin the integration test's boot-log check to the exact example.com REFUSED line, and cite NET-079 (the deny-all case) rather than NET-141 at the lines this change added. --------- Co-authored-by: gominimal-aw-bot[bot] <281738952+gominimal-aw-bot[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> (cherry picked from commit 2c2f8cc) * fix(net): spawn the guest DNS tasks with tokio::spawn on release/0.7.0 crate::traced landed on main after the release branch was cut, so the cherry-pick of #2300 did not compile here. * build: declare 0.7.3 for the release/0.7.0 backports v0.7.2 is tagged at the branch head, so the version check requires the next patch release. * chore(deps): update pulldown-cmark to 0.13.5 for RUSTSEC-2026-0414 * fix(minimald): close the host classifier's mark, IPv6 and probe gaps (T105) (#2712) * fix(minimald): close the classifier's mark, IPv6 and probe gaps The install's conflict scan now treats a ct-mark write with no mask as a user of every bit, names each rule with its table and chain, and --ct-mark-mask refuses the ranges Tailscale and kube-proxy class with. The table refuses non-loopback IPv6 from the boxes subtree and counts that refusal in the same named counter as the deny chain. The per-launch probe reads with a UDP datagram, so a launch no longer waits the SYN retransmit a refused TCP connect pays. The reading at daemon start keeps its TCP leg. Each probe logs its leg and duration. * test(minimald): prove the classifier's mark, IPv6 and probe gaps live Three root-lane proofs load the real table: the install refuses a whole-mark ct writer and a mask in a well-known range, and an allow box's IPv6 connection to a peer is refused and counted. The live probe proof also checks the per-launch reading waits no retransmit. * fix(minimald): pass shellcheck and pin the new mask refusals The rerun hint's empty assignment tripped SC1007 in the shell lint gate. The installer test pinned the old remedy text and escaped with 0x0000c000, the kube-proxy range the install now refuses: it now pins the new remedy, escapes with 0x03000000, and pins the well-known range refusal. The IPv6 refusal comment names the condition that replaces it. * fix(minimald): re-apply the recorded ct-mark mask and name min finalize-install With no --ct-mark-mask, the install step adopts the mask a previous install recorded under the tree. Mask refusals now name min finalize-install --ct-mark-mask <mask>. The conflict scan joins the nft and iptables-save hits with a newline. * feat(minimal): add min finalize-install --ct-mark-mask and keep it at boot The mask record lives in cgroupfs, so a reboot empties it. The classifier step's block now passes the chosen or recorded mask to the one-time run and to the boot unit's ExecStart, so the operator's bits survive a reboot. A requested mask that differs from the loaded table's re-runs the step. * fix(minimald): refuse a CONNMARK --restore-mark that copies the whole mark The install's ct-mark scan now treats --restore-mark with no --mask, --ctmask or --nfmask, or an all-ones one, as a whole-mark writer, as it does --save-mark. A restore with a narrow mask is still no conflict. * fix(minimald): allow --restore-mark, bind probe datagrams first A CONNMARK --restore-mark copies the connection mark into the packet mark and never writes the connection mark, which is all the classifier reads. This reverts 16d9160 and pins a restore with no mask as no conflict. hold_probe_listeners now binds its datagram endpoints before it spawns any TCP drain thread, so a failed datagram bind returns before a listener serves. --------- Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com> (cherry picked from commit 354548e) * fix(minimald): adapt the host classifier gaps backport to release/0.7.0 The cherry-pick before this one keeps main's text for every line #2712 changes. Main's neighbouring code comes from the QUIC block work (#2513, #2553, #2601, #2644), the box-name placement (#2722) and the crate renames, none of which release/0.7.0 has. The conflicts were resolved onto release's code without importing that work: - classifier.rs: the four new unit tests are appended after release's last test, without the QUIC cohort tests main has above them. Their sandbox::classifier paths are sandbox2::classifier here. - install-host-classifier.sh: the table gains the refused counter. The QUIC leaf set that main declares beside it is not on release, so it stays out. The --help range (2,87p) matches release's header too. - finalize_install.rs: release has one classifier item, built by classifier_item_on_this_host, not main's classifier_items_on_this_host with the QUIC block helper item. That function takes --ct-mark-mask and fills recorded_mask and requested_mask itself. plan_for_this_host keeps release's names item placement and only passes the mask on. - #2712's edits to finalize_install_names_the_quic_block_helper are dropped: release has no QUIC block helper item or test. - install_test.sh: run_hc puts HC_PATH_PREFIX ahead of PATH, the line #2601 added on main. Without it the new --restore-mark case never reaches its stand-in iptables-save, and shellcheck flags the variable as unused. The user-facing text is main's, unchanged. --------- Co-authored-by: gominimal-aw-bot[bot] <281738952+gominimal-aw-bot[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
T31 — Reject UDP to port 443 where a box's QUIC stance is blocked
slice: S4
kind: task
covers: BEP-018
size: L
est: 280 code, 240 tests
executor: agent
difficulty: needs care
model: standard
diagnostics: the bundle's daemon log tail carries each rejected UDP 443 datagram's box and destination, rate-limited
observability: one rate-limited debug log line per rejected datagram with the box and the destination
layers:
- net:
- crates/minimald/src/net/switch.rs: rejects UDP to 443 with ICMP port unreachable for a blocked box, and to the steered proxy address always
- crates/minimald/src/net/classifier.rs: blocks the
host_ipcohort when any resident member is blockedtest: cargo nextest run -p minimald quic443_blocked_rejects_udp_443
test: cargo nextest run -p minimald udp_443_to_steered_proxy_rejected_in_every_stance
test: cargo nextest run -p minimald host_ip_cohort_quic_stance_most_restrictive_wins
- spec:
- crates/boxes/src/core/bep.rs: the property test over the stance resolution
test: cargo nextest run -p boxes prop_quic443_auto_resolves_on_grants_and_steering
produces: none
consumes: none
proof: A dns-steered grant box's QUIC to port 443 gets an immediate port-unreachable.
depends on:
- blocked by #2276
Proof
An own_ip box with a broker grant under dns (or both) steering sends UDP to port 443. Its relay now writes an ICMP port unreachable back into the box at once and does not forward the datagram, so a QUIC client falls back to TCP. UDP 443 to the Box Egress Proxy address gets the same answer in every stance. The relay tests show both cases end to end.
Notes from the agent: 1. Stance input: BoxPolicy carries quic443 since round 4. activate_box sets it from [session.network] quic443 for every box, lane or not, and BoxGate::for_session resolves policy.quic443.unwrap_or_default().blocks(..) over the auto facts (the lane's broker grants and resolved steering). A declared block or allow overrides auto in production. The with_quic443 and set_quic443 test hooks are gone.
2. host_ip cohort: classifier.rs now has CohortQuic443 (join, leave, blocked, blocking_members), which decides most-restrictive-wins. It is not enforced. The host-address verdict comes from a fixed nftables table that the privileged step installs, and the module states that nothing edits it at launch or stop. Enforcement needs a UDP 443 rule in that table, keyed to a set or flag, and launch/stop wiring that calls join and leave. Both are open under residual #2515.
3. Diagnostics: each rejection writes tracing::debug! with switch_addr (the box's lease), destination and reason. Rate limit: one line per 10 s window per gate, which carries a suppressed count. I did not check that the bundle's daemon log tail keeps debug-level records.
4. Ordering: the UDP 443 check runs before the egress verdict. A blocked datagram gets the ICMP reply even if the box's rules would have dropped it in silence. IP fragments after the first are not parsed, so they pass to the egress verdict.
5. clippy -p minimald --all-targets shows no new warnings. The chunks_exact warning at switch.rs:521…[truncated]
Tests
cargo nextest run -p minimald quic443_blocked_rejects_udp_443cargo nextest run -p minimald udp_443_to_steered_proxy_rejected_in_every_stancecargo nextest run -p minimald host_ip_cohort_quic_stance_most_restrictive_winscargo nextest run -p boxes prop_quic443_auto_resolves_on_grants_and_steeringVerify
min task run agent-verifyexited 101 under rustc 1.98.1, which the repository does not pin (1.97.0 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.Layer exception
Round 4 added
quic443toBoxPolicy, so everyBoxPolicystruct literal in the tree had to name the new field. Outside the T31 layers the change is the one-linequic443: None,in each literal, plus a three-line carry (quic443: policy.quic443with its comment) incrates/minimald/src/box_actor/setup.rs:crates/minimal/src/cmd/boxes/attach.rs,vm_host.rscrates/minimal/src/dash/render.rs,rpc.rscrates/minimald-rpc/src/tests.rscrates/minimald/src/box_actor/setup.rs,tests.rscrates/minimald/src/net/dns_gate.rs,gvproxy_network.rs,listeners.rs,proxy.rscrates/minimald/src/rpc/tests.rscrates/minimald/tests/netns_root_integration.rsAccepted under the layer-exception rule of 2026-10-19: a required one-line change in a file the layers do not name.
Residuals
host_ipcohort's blocked quic443 stance in the host-address nftables ruleset and callCohortQuic443::joinandleavefrom the launch and stop paths (arch C2).CohortQuic443decides most-restrictive-wins but nothing enforces it yet.Closes #2282
Generated by Claude Code