Repository navigation
fix(minimal,minimald): finalize-install installs the QUIC block helper and reports its status apart - #3620
Conversation
…k mask The classifier step gains --quic443-helper-only, which installs the helper and its sudoers rule without the ct-mark scan. A ct-mark refusal now names the program each rule belongs to and a free --ct-mark-mask.
The helper item carries its own block, the classifier step's helper-only mode, so a classifier refusal leaves the helper installed. A run whose script stops reports each item it carried as installed or not.
…nstall-installs-the-quic-block-helper
|
Important Review skippedBot user detected. Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.
|
|
Un-drafted: the |
|
/review |
|
/arch-review |
|
Approved: no findings at Nothing to do. Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it. Clobber: none seen. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms to the design. Section 7.4 of the networking design keeps the classifier behind one privileged install step, with no prompt at session start. The helper-only mode stays in that step and in the same script. The daemon still fails a launch when the helper refuses an add, so a helper without the classifier table cannot open QUIC. No condition is necessary.
Ruled at b3ea623 against gominimal/arch@8b824707cde6 by claude-opus-5-5.
There was a problem hiding this comment.
The helper-only mode, the rule-owner and free-mask lines in the refusal, and the per-item report after a failed run all hold up when traced through the script and the CLI. I found nothing wrong in free_ct_mark_mask (the subshell, restoring the chosen bits, avoiding the well-known ranges), in the --help range change, or in the new tests. There is one Medium finding. The QUIC helper block now runs ahead of every missing item, and it exits the script when it fails. So a helper failure, such as a missing nft, also skips the userns-profile and names items, which used to install before the classifier step. This goes further than the open thread about the classifier being skipped.
Generated by Claude Code
|
/revise Fix the two open MEDIUM threads in |
1 similar comment
|
/revise Fix the two open MEDIUM threads in |
…nstall-installs-the-quic-block-helper
The helper block moved to the head of the finalize-install script and exited on failure, so a helper refusal skipped the userns-profile, names and classifier blocks. It now sits just before the classifier block, records its status, and the script ends with that status after every later block ran.
…nstall-installs-the-quic-block-helper
|
Round 2 of 10 on a /revise note, pushed as
Verify Converted to a draft: something above needs a person before review. Review threads the coder judged:
On a host with a rule that uses the install's ct-mark bits, min finalize-install installs /usr/local/lib/minimal/quic443-leaf and its sudoers rule before the classifier step refuses. The run shows the QUIC block helper as installed and the classifier as not installed, and the refusal names the rule owner and a free --ct-mark-mask. A helper step that fails no longer skips the userns-profile, names or classifier steps. The script ends with a non-zero status. Notes from the agent: Revise round 2. Item.script_first is replaced by script_before (the id of the item whose block this one runs just ahead of) and script_end (a line the script runs after every block). The helper block now keeps plan order except that it moves to just before the classifier block when the classifier is also missing. It records quic443_status and no longer exits. The script ends with |
Pull request was converted to draft
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The fix commit keeps the QUIC block helper inside the privileged install step that §7.4 line 282 describes. Its block now runs just ahead of the classifier block. A failed helper step no longer stops the later blocks, and the script still ends non-zero with the helper step's status. The rest of the change keeps the earlier PASS at b3ea6234. No conditions.
Ruled at c325771 against gominimal/arch@8b824707cde6 by claude-opus-5-5.
The note named every well-known program, but the scan reads the host's rule listings and two known mark ranges. Say that no rule this step read and no program this step knows uses the bits.
|
Round 3 of 10 on the runtime's review findings, pushed as
Verify Converted to a draft: verify timed out after 1800s. Review threads the coder judged:
On a host with a rule that uses the install's ct-mark bits, min finalize-install installs /usr/local/lib/minimal/quic443-leaf and its sudoers rule. The summary shows the QUIC block helper as done and the classifier as refused. The refusal names the program that owns the rule and a free --ct-mark-mask, and the free-mask line now claims only what the scan checked. Notes from the agent: Revise round 3. One change: the free-mask line now reads 'No rule this step read uses the bits , and no program this step knows marks connections with them.' The test install_refusal_names_rule_owner_and_free_mask pins the new text. |
|
/review |
|
/arch-review |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
This push changes only the wording of the free-mask line in the ct-mark refusal and the test that pins it. The new text says only what the scan read, and the step still refuses. The classifier stays in the privileged install step (architecture.md lines 1105-1107). The earlier PASS stands for the rest of the change.
Ruled at 17d8c5a against gominimal/arch@8b824707cde6 by claude-opus-5-5.
There was a problem hiding this comment.
Gate passed at 17d8c5a: minimal-review and arch approved, lanes green, no open threads.
Follow-up
Fixes #3581
scripts/install-host-classifier.shcrates/minimald/src/net/classifier.rscrates/minimal/src/cmd/finalize_install.rsTask marker
Proof
On a host with a rule that uses the install's ct-mark bits, min finalize-install runs the QUIC block helper's own block first (install-host-classifier.sh --quic443-helper-only). That block installs /usr/local/lib/minimal/quic443-leaf and its sudoers rule without the ct-mark scan. The classifier step then refuses. Its error lists the rule, says which program the rule belongs to by its table or chain name, and names a free mask: 'To use them, run: min finalize-install --ct-mark-mask 0x...'. After that, the run prints one line per item: '✓ QUIC block helper: installed' and '✗ deny-all egress enforcement ...: not installed'.
Notes from the agent: Wording: the run report marks the classifier item as 'not installed', not 'refused'. The report reads the host again after the script stops, and that read proves only whether each item is installed. The refusal itself is the step's error printed above the report. The first line of the report says the script stopped with that error.
The program that owns a rule is matched by its table or chain name (Tailscale ts-, kube-, DOCKER*, firewalld, netavark, libvirt*, wg-quick, cilium*, cali-, ufw, f2b-*, mullvad). If no name matches, the line says the step cannot name the program. A Tailscale CONNMARK in the plain mangle OUTPUT chain does not match by name.
The free mask is the highest pair of contiguous bits that no scanned rule uses and that no well-known range touches. It prints on its own line before the old closing sentence. The closing sentence 'Choose two contiguous bits ... --ct-mark-mask ' stays the same, because scripts/install_test.sh (outside the layers) pins it at the end of a line. No free-mask line prints for a whole-mark writer or an unlisted CONNMARK, because no mask avoids either one.
The helper block stages a second copy of the classifier script, at install-host-classifier.sh.quic443, and removes it after the run. So --show --script prints the step's bytes twice when both items are missing. …[truncated]
Tests
cargo test -p minimald install_refusal_names_rule_owner_and_free_maskcargo test -p minimald quic443_helper_only_installs_over_ct_mark_conflictcargo test -p minimal quic443_helper_installs_when_classifier_step_refusescargo test -p minimal summary_reports_each_item_after_classifier_refusalVerify
min task run agent-verifytimed out after 1800s, so this PR is a draft.Base
The base branch moved while the coder worked; it was merged in before the tests ran.