fix(hcg-policy): cover wired POST /cartridge/:name/sse (Phase E §1.5)#165
Merged
Conversation
Re-verified config/gateway-policy-boj-example.yaml against the live BojRest.Router for HCG tier-2 rollout. The wired POST /cartridge/:name/sse route (router.ex line 130; ADR-0013 §6; STATE 2026-05-18) was absent from the example policy — silent surface drift since contract v1.0. Adds `cartridge-sse-post` alongside `cartridge-invoke-post` (same trust gate, same per-cartridge auth.method requirement, streaming response envelope around a single dispatch). Ticks the §1.5 surface-coverage box on the rollout runbook with the re-verification date; flags the live-policy promotion (config/gateway-policy-boj.yaml) and the smoke-test box as the remaining §1.5 work. No runtime behaviour change. Policy YAML re-parses cleanly (27 → 28 rules; global_verbs unchanged: GET, POST). `sse-get` (top-level, declared-not-yet-wired) and `cartridge-sse-post` (per-cartridge, wired) coexist as distinct rules — different path, different verb. Refs hyperpolymath/standards#100 Refs hyperpolymath/standards#91 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
🔍 Hypatia Security ScanFindings: 179 issues detected
View findings[
{
"reason": "Stale AI session file -- delete",
"type": "stale",
"file": "GEMINI.md",
"action": "delete",
"rule_module": "root_hygiene",
"severity": "medium"
},
{
"reason": "Issue in abi-drift.yml",
"type": "unknown",
"file": "abi-drift.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in codeql.yml",
"type": "unknown",
"file": "codeql.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in container-publish.yml",
"type": "unknown",
"file": "container-publish.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "unknown",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "unknown",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "unknown",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "unknown",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "unknown",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "unknown",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Re-verifies
config/gateway-policy-boj-example.yamlagainst the liveBojRest.Routerfor HCG tier-2 rollout (Phase E §1.5 prereq,standards#100). The wiredPOST /cartridge/:name/sseroute —elixir/lib/boj_rest/router.exline 130, called out in ADR-0013 §6 and the STATE entry 2026-05-18 ("boj-rest SSE: POST /cartridge/:name/sse on the same single Cowboy listener + trust-gated dispatch") — was absent from the example policy. Silent surface drift since contract v1.0; exactly the risk Phase A flagged.cartridge-sse-postrule (regex^/cartridge/[A-Za-z0-9_.-]+/sse$, POST,authenticated) alongsidecartridge-invoke-post. SameBojRest.Router.check_trust/3gate, same per-cartridgeauth.methodrequirement, streaming envelope around a single dispatch.docs/integration/hcg-tier2-rollout-runbook.mdwith the re-verification date; flags live-policy promotion as the remaining work before §3.1.The unrelated top-level
/sseGET rule (declared-not-yet-wired, openapi.yaml only) is left in place — different path, different verb, different surface.What this PR does NOT do
standards#100. Phase E still has: gateway smoke-test against this policy (§1.5 next box); live-policy promotion (config/gateway-policy-boj.yaml); §1.4!OWNER:block; Phase D-4 baseline (bench/baseline.json _statusstill"scaffold-placeholder"upstream — gates the perf-regression CI alert); staging soak (§2.3); production rollout (§3); §6.4 Trustfile flip.Test plan
python3 -c "import yaml; yaml.safe_load(open('config/gateway-policy-boj-example.yaml'))"); 27 → 28 routes;global_verbsstill[GET, POST].sse-get(top-level, declared-not-yet-wired) andcartridge-sse-post(per-cartridge, wired) appear as distinct rules under the parsedgovernance.routeslist.BojRest.Router(/.well-known/boj-node-pubkey,/health,/menu,/cartridges,/cartridge/:name,/cartridge/:name/invoke,/cartridge/:name/sse) now have a matching policy entry.POST /cartridge/:name/ssewithX-Trust-Level: authenticatedproxies through and withX-Trust-Level: untrustedreturns 403. Out of scope for this PR; that flips the §1.5 smoke-test checkbox, not this one.Refs hyperpolymath/standards#100
Refs hyperpolymath/standards#91
🤖 Generated with Claude Code
Generated by Claude Code