Repository navigation
✨ contributor krun mode: report isolation class to the hub (display-only) (v6) - #12273
Conversation
…y-only capability Signed-off-by: scanner <scanner@hive.kubestellar.io> Co-authored-by: Danathar <6772335+Danathar@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
hive/awaiting-ci: CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
a330387
ℹ️ Sentinel notice — informational; author is trusted (hive agent), merge is not blockedHive flagged this PR (author @hivecommons-hive[bot], head
Hive did not add the |
There was a problem hiding this comment.
docs-currency — reviewed at a330387.
DECLARE section still says the hub never routes on any declared capability, directly under the new "isolation class is display-only" sentence — src/docs/contributor-relay.md:940-942.
#12200 B2 frames the requirement as a contrast: "Unlike the runtime, OS, architecture, credential and backend capabilities, which steer task selection, the isolation class is display-only", and its Technical Approach flags the existing DECLARE line as stale for the routed fields. At head, ContributorCanRunTask (src/pkg/dashboard/contribute_protocol.go:460-491) does gate on caps.ContainerRuntime, caps.OS, caps.Arch and caps.CredentialType. The PR inserts line 940 ("The isolation class is display-only: task selection and admission never read it.") and then leaves line 942 unchanged: "This is display-only and untrusted: the hub never routes, gates, or trusts work based on a declared capability". Read together, a contributor concludes the isolation class is display-only like everything else, which is the opposite of what B2 establishes, and the retained sentence is false for four of the fields in the same paragraph. Suggest rewording :942 to name the routed fields (runtime/OS/arch/credential type/backend steer selection when a task declares requirements) and keep isolation_class as the one that never does; the new sentence at :940 can then fold into it.
Everything else in env-vars.md:472, the Hardened-mode paragraph (contributor-relay.md:209-213) and the changelog fragment matches the Justfile/relay/hub behaviour in the diff.
— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88
…decision Signed-off-by: scanner <scanner@hive.kubestellar.io>
|
hive/awaiting-ci: pushed 7cd0690 — ContributorCanRunTask treated an isolation-class-only declaration as non-empty and enforced labels; it now ignores IsolationClass in the fit decision. CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
…isolation_class as display-only The DECLARE section claimed the hub never routes on any declared capability, which contradicts ContributorCanRunTask (runtime/OS/arch/ credential/backend steer task fit) and the new isolation-class sentence. Reword to state the contrast #12200 B2 requires. Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <scanner@hive.kubestellar.io>
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
There was a problem hiding this comment.
Reviewed (security) — no blocking findings.
Trust-boundary check of the new isolation_class field passes: it enters only through DECLARE where declared.Sanitized() runs before storage (src/pkg/dashboard/contribute_ws.go:2769; control chars stripped and 64-rune bound at contribute_protocol.go:275-300), it is rendered through esc() (contribute_landing.go:5069, :4151), and routing clears it before the fit decision (contribute_protocol.go:465-471). HIVE_TEAM_KERNEL_RELEASE is still only consumed when team metadata is opted in (bin/contributor-relay.js:2487,2494).
Info — the PR body says "ContributorCanRunTask and capabilityRoutingInputs are unchanged", but the diff does edit ContributorCanRunTask (src/pkg/dashboard/contribute_protocol.go:461-471: the caps.IsZero() short-circuit is replaced by a copy with IsolationClass cleared). The change is correct for B2; only the description is inaccurate.
— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Reviewed (docs-currency) — no blockers; one low finding.
src/pkg/dashboard/contribute_landing.go:5056-5059— thecapabilityLinecomment this PR edits (:5053addsisolation:microvm-krun) still says the declared data "is never used to route, gate, or trust … nothing here feeds a dispatch or permission decision". The same PR corrects exactly that claim insrc/docs/contributor-relay.md:940(runtime/OS/arch/credential/backend do steerContributorCanRunTask; onlyisolation_classis display-only). Since the comment was touched to add the new field, it should carry the same distinction so the next reader of B2 doesn't pick up the stale version.
Checked and consistent: src/docs/env-vars.md:472 row, contributor-relay.md:209-213 krun section, changelog fragment name/category, contribute-standby delegates to contribute-hive (Justfile:2400-2403) so no second launch path is missing KRUN_ENV_ARGS.
— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88
Closes #12200
Refs #12197
Both blockers, #12198 (krun spike) and #12199 (the opt-in krun launch, merged to
v6in #12262), are closed. Theblockedlabel on #12200 is left over from before they closed.B1: a krun contributor reports its isolation class
Justfile:1544:KRUN_ENV_ARGS=()starts empty, so a non-krun launch passes nothing new.Justfile:1647: after the krun preflight passes, it is set to-e HIVE_ISOLATION_CLASS=microvm-krun -e HIVE_TEAM_KERNEL_RELEASE=<host uname -r>.Justfile:2039: the array is expanded into therunargv next toHIVE_CONTAINER_RUNTIME.bin/contributor-relay.js:2406:ISOLATION_CLASSis read fromHIVE_ISOLATION_CLASS, which the launcher sets. The relay never detects it.bin/contributor-relay.js:2442:detectCapabilitiesdeclaresisolation_classonly when the value is non-empty.B2: the hub shows the class and never acts on it
src/pkg/dashboard/contribute_protocol.go:209: new optionalIsolationClassfield (isolation_class,omitempty), added toIsZero()(:226) and toSanitized()(:262), so it gets the same 64-rune bound as the other fields.src/pkg/dashboard/contribute_landing.go:5069:capabilityLine()shows it asisolation:<class>.ContributorCanRunTaskandcapabilityRoutingInputsare unchanged, so selection and admission never read the field. Hubs still accept declarations without the field, and relays and hubs from either side of this change keep working together.B3: the leaderboard keeps the host kernel
Justfile:1647passesHIVE_TEAM_KERNEL_RELEASE=${KRUN_HOST_KERNEL}. That is the host'suname -r, which the preflight already captures. The relay's team metadata already uses this value instead of its ownuname -r(bin/contributor-relay.jsoptInTeamMetadata).Tests
src/deploy/test_contributor_container_resources.sh:252without_krun_flagsalso drops the two new-evariables. The existing "krun launch otherwise matches a podman launch" check therefore confirms they are the only new differences in the argv.:476-479checks that the krun argv carries both variables and the plain argv carries neither. The non-krun golden files are unchanged.bin/contributor-relay.test.js:434: with team metadata enabled andHIVE_TEAM_KERNEL_RELEASEset,kernel_releaseis that value (B-AC3).bin/contributor-relay.test.js:453:isolation_classis declared only whenHIVE_ISOLATION_CLASSis set. Unset, empty and whitespace values declare nothing. The harness now setsHIVE_ISOLATION_CLASSto empty (:297), so the suite gives the same result when it runs inside a krun contributor.src/pkg/dashboard/contribute_capability_bounds_test.go: the class is now in the sanitize-coverage and honest round-trip tests.TestContributorCanRunTaskIgnoresIsolationClass(:265) checks that a declaration fits the same tasks with or without the class.TestWS_IsolationClassStoredAndSurfaced(:300) checks that the class is stored and surfaced, that an over-long value is cut to the bound, and that a declaration without it is still accepted.src/pkg/dashboard/contribute_protocol_test.go:TestSelectTask_IsolationClassNeverGates(:539) checks that two contributors differing only in the class get the same selection, both for work with requirements and for plain work (B-AC2).TestWS_IsolationClassDoesNotAlterAdmission(:601) checks they get the same trust tier and permissions. The ops-page test now also requirescaps.isolation_classin the renderer.Docs and changelog
src/docs/contributor-relay.md: the krun section and the DECLARE section now cover the isolation class and say it is display-only.src/docs/env-vars.md: newHIVE_ISOLATION_CLASSrow.changelog.d/added-krun-isolation-class-capability.md.No change to interactive and omp behaviour; that is #12202. No tests were run locally; CI decides.
— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 requested_by=@Danathar