Repository navigation
✨ feature(stream): disabled-by-default hivecommonsfleet public-safe broadcast - #15998
Conversation
|
@Karibhou this PR is back in your court ( Failing checks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity. |
There was a problem hiding this comment.
docs-currency (read at head cf94d18). Docs match the gate and proxy behaviour; two small operator-facing gaps:
-
Policy-version bump list is incomplete and unpinned.
src/docs/streaming-the-activity-monitor.md:253-255tells the owner to bump the version "here, inpublic-safe-gate.shand insrc/internal/streamdeploy", but the literal also lives insrc/deploy/stream/README.md:34and twice more in this doc (:214,:280). The only cross-check is gate ↔ Go const (src/internal/streamdeploy/streamdeploy_test.go:332); the doc/README copies can drift, which defeats the "old acknowledgement cannot cover new content" guarantee the sentence exists for.Bump the version everywhere it appears — this file (three places), `src/deploy/stream/README.md`, `public-safe-gate.sh` and `src/internal/streamdeploy` — whenever this text changes, so an old acknowledgement cannot cover new content.Optionally extend the test at
streamdeploy_test.go:332to alsostrings.Containsthe version in both markdown files. -
Shipped-default symptom is not a gate refusal.
:219-220says shipped defaults "fail every one of these" and:287-289says a refusal appears in the pod log. With the key not yet installed,fleet/deployment.yamluses a non-optionalsecretRef: twitch-stream-hivecommonsfleet, so the container never starts (CreateContainerConfigError) and no gate line is logged; alsoDASHBOARD_URLalready passes thehttps://check. Suggest after:289:names the missing condition without printing any value. If the pod sits in `CreateContainerConfigError`, the `twitch-stream-hivecommonsfleet` Secret is missing (step 2) — the gate has not run yet.
— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from Security perspective (head Advisory (info, non-blocking): the body says the kiosk is anonymous "by construction" via the proxy, but the proxy does not rewrite upstream Review findings from Style/maintainability pass on cf94d18 (read the diff plus 1. Public-safe proxy inherits a token-oriented log line (low). 2. Byte-for-byte pin has no regeneration hint (info). Consistency otherwise matches the tree: Review findings from Looks correct to me, and the red CI on this head is not this PR's fault. CI: What I verified in the tree (head
One low-severity note (not a blocker): Body and diff agree: the Review findings from Code read at What I verified against the tree (not just the diff):
One thing worth a maintainer's eye (not a blocker):
CI: Body vs. diff: the acceptance table matches what I read; the body is explicit that the hub-side public-safe route and its row-filter test are deliberately left for after #15965, and |
Open PR overlap checkBase branch:
Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
cf94d18
|
|
@Karibhou the hive has adopted this PR ( |
cf94d18 to
b018d63
Compare
|
hive/awaiting-ci: rebased onto v5 (picks up #15997, which fixed the 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
Decision needed: @hanthor should decide whether this disabled-by-default hivecommonsfleet deployment base (deploy manifest + public-broadcast gate, sentinel-alert) should land now while #15966 stays open for the hub's public-safe view route, and whether the hard-coded https://hive.hivecommons.dev origin and policy id hivecommonsfleet-public-safe-v1 are the ones you want pinned.
Code looks correct to me; routing because it adds a deploy manifest for a public broadcast and a hash-pin on the existing stream config. Nothing here is a defect.
What I verified at b018d63 (diff first, then the base tree, then the body):
- Existing
twitch.tv/hivecommonspath is unchanged in behaviour.public-safe-gate.sh:28is'') exit 0 ;;whenSTREAM_PROFILEis unset, andentrypoint.shruns it underset -euo pipefail(line 28) so a non-zero exit really does stop the container before Xvfb/Chromium/ffmpeg.authproxy/main.goonly takes thenewPublicProxybranch whenSTREAM_PROFILE == "public-safe"; the default branch calls the originalnewProxyuntouched. newPublicProxywrapping is safe.newProxyin the base always sets bothRewriteandModifyResponse(authproxy/main.go:63-96at v5), so the wrappedrewrite(pr)/modify(resp)calls never hit a nil func.- Fail-closed by construction.
fleet/configmap.yamlshipsSTREAM_ENABLED: "false",PUBLIC_SAFE_POLICY_ACK: "",DASHBOARD_PATH: "CHANGE-ME-…", andfleet/deployment.yamlhasreplicas: 0and nodashboard-tokensecretRef. Even withSTREAM_ENABLED=truethe gate refuses on the placeholder path.entrypoint.sh:31already defaultsDASHBOARD_TOKENto empty, so the no-credential profile can start once the gate passes. kustomize build src/deploy/stream/fleetrenders: Namespace/ConfigMap/Deployment/NetworkPolicy inhive-stream-fleet, egress limited to DNS + public 1935/443, no in-cluster dashboard rule.- Hash pins are right. All eight sha256 values in
src/internal/streamdeploy/streamdeploy_test.gomatch the files at this head (checkeddocker-compose.yaml,k8s/*.yaml,overlays/hive-hosted/kustomization.yaml).TestHivecommonsStreamConfigUnchangedonly walksk8s/andoverlays/hive-hosted/, so the open #15985 (newoverlays/hive-hosted-matrix/) does not trip it. Stream Image / Build (PR gate, no push)is green, and the Dockerfile now runsgo testin the authproxy stage, soTestPublicProxyIsAnonymous/TestPublicProxyRefusesTokenactually ran.
Things for the decision-maker, not defects:
- The byte-for-byte pin is a deliberate ratchet. Any future edit to
k8s/*.yaml,docker-compose.yamloroverlays/hive-hosted/kustomization.yaml(an image tag bump, a bitrate change) will failstreamdeploy_test.gountil the hash map is updated. The comment at the top of the map says that is the intent per #15861; confirm you want that friction. Refs #15966 — partial on purposeis stated in the body with what remains (the hub's public-safe view route). The scope declaration is explicit, so I am not re-asking it; I am asking only whether the deploy side should land before its consumer exists.- Not a duplicate of #15985 (different channel, standalone
fleet/base), but both add aREADME.mdtable row and a doc section, so the second to land needs a small rebase.
I have not approved, merged, or closed anything.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Needs a decision, not a merge:
Head: verdict requires_human @b018d63, 61/61 checks green, DCO yes, sentinel alert, soak 1m0s of 10m0s. How to release it:
Clear the cause and the hive re-evaluates on its next pass; the stage moves to |
|
/lgtm Posted by @clubanderson from the Hive dashboard; the merge gate decides from here. |
|
@hivecommons-hive[bot]: changing LGTM is restricted to collaborators DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/approve Posted by @clubanderson from the Hive dashboard; the merge gate decides from here. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: hivecommons-hive[bot] 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 |
…roadcast Add an independent streamer deployment for the hub-wide monitor on twitch.tv/hivecommonsfleet (RFC hivecommons#15861, proposed by @hanthor; child hivecommons#15966). - src/deploy/stream/fleet/: standalone Kustomize base with its own namespace (hive-stream-fleet), Deployment, ConfigMap, NetworkPolicy and stream-key Secret name (twitch-stream-hivecommonsfleet, template only). Ships disabled: replicas 0, STREAM_ENABLED "false", placeholder source. - public-safe-gate.sh: with STREAM_PROFILE=public-safe the entrypoint refuses to start any process unless the owner enabled the stream, acknowledged policy hivecommonsfleet-public-safe-v1, set a real https source, left DASHBOARD_TOKEN unset and installed a stream key (only 'null' or an absolute local *.flv path count as a dry run). Unset profile: no-op, so twitch.tv/hivecommons is unaffected. - authproxy: public-safe mode refuses a token, strips browser Authorization/Cookie and drops Set-Cookie, so the kiosk renders the hub anonymously; its tests now run in the image build stage. - src/internal/streamdeploy: CI tests pin the hivecommons stream config byte for byte, check the fleet deployment is isolated and disabled with no credential, and exercise the gate's fail-closed cases. - Docs: owner enablement steps, public-safe content policy, and that dashboard authentication does not protect Twitch output. No broadcast is activated by this change. Hive-Run: hivecommons#15966 Hive-Plan: RFC hivecommons#15861 implementation child 5 (hivecommonsfleet broadcast) Hive-Spec: hivecommons#15966#acceptance Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HRH6kiPnEbPztw3Fo9fJiM Signed-off-by: Karibhou <Karibhou@users.noreply.github.com>
b018d63 to
22a96c2
Compare
|
@Karibhou this PR has a new head without confirmed hive push evidence, so the hive has handed this PR back to you ( |
Implements the deployment side of #15966, the fifth implementation child of RFC #15861 (proposed by @hanthor, cc @hanthor).
Refs #15966 — partial on purpose. Still to do: the hub's dedicated public-safe view route (with a hub-side test that private rows are omitted). It needs the Fleet activity data and page from #15951 → #15963 → #15964 → #15965, and none of those have landed yet. The issue should stay open until that route ships.
What shipped in this PR
src/deploy/stream/fleet/: a standalone Kustomize base fortwitch.tv/hivecommonsfleet. It has its own namespace (hive-stream-fleet), Deployment, ConfigMap and NetworkPolicy. Its stream-key Secret is referenced by name only (twitch-stream-hivecommonsfleet;secret.yamlis a template). It shares no resource withk8s/oroverlays/. Egress is limited to DNS and public 443/1935, with no in-cluster rule. It reuses the existinghive-streamimage.replicas: 0;STREAM_ENABLED: "false";STREAM_PROFILE=public-safe, which runs the newpublic-safe-gate.shfromentrypoint.shbefore any process starts. The gate refuses unlessSTREAM_ENABLED=true,PUBLIC_SAFE_POLICY_ACK=hivecommonsfleet-public-safe-v1,DASHBOARD_TOKENis unset, the source is a realhttps://origin with noCHANGE-MEplaceholder, andTWITCH_STREAM_KEYis installed. A dry run is allowed only withSTREAM_OUTPUT=nullor an absolute local*.flvpath;rtmp://…/x.flvand similar are refused. With the profile unset, the gate is a no-op.Authorization/Cookieheader and dropsSet-Cookie. The kiosk can therefore only render what the hub serves to an anonymous visitor. There is no viewer account whose per-user fleet visibility could leak onto Twitch.stream-image.yml's PR build is the only CI lane that sees that package.streaming-the-activity-monitor.md#the-hivecommonsfleet-broadcast):changelog.d/added-15966-hivecommonsfleet-stream.md.Acceptance mapping
TestHivecommonsStreamConfigUnchangedpins sha256 ofk8s/*,overlays/hive-hosted/*anddocker-compose.yaml, and fails if a file is added there. The diff touches none of them.TestPublicSafeGateFailsClosed(20 cases, including the shipped defaults and the network-sink bypass) andTestFleetDeploymentIsIndependentAndDisabledTestPublicProxyIsAnonymous/TestPublicProxyRefusesToken. Hub-side row filter test: remaining, lands with the public-safe route after #15965.TestFleetManifestsCarryNoCredential; the docs install the key via a silentread -rschangelog.d/added-*.mdHow tested
Per
AGENTS.md, I did not rungo test,go buildorgo vetlocally; CI gives the verdict. Local checks:gofmt -lis clean on the changed Go files,shellcheckandbash -nare clean on the scripts, and I ran the gate by hand for every case: no profile → 0, shipped defaults → refused (3), network.flvsink → refused, local dry run → 0. Apr-review-toolkitcode-review pass found two issues: the network.flvsink bypass and a missing executable bit. Both are fixed in this PR.Deployment / activation status
Nothing is activated. This PR does not apply any manifest, install any credential or enable any broadcast. The existing
twitch.tv/hivecommonsstream is unchanged. Thehivecommonsfleetchannel is provisioned (owner, #15861), but the stream key and the public-safe hub view are still owner actions, and the latter is also future work. A merge of this PR does not complete #15966.— hive: backend=claude
🤖 Generated with Claude Code
https://claude.ai/code/session_01HRH6kiPnEbPztw3Fo9fJiM
🐝 Hive Agent:
contributor| SHA:cf94d1842