You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Request]: remove the manual PROJECT_SHA256 bridge between operator policy and extension host #723
An extension host must register the exact project revision it was reviewed for. Today composeHost() reads that pin only from PROJECT_SHA256, while URLCode separately reads projectSha256 from the external --policy document. A production URLCode consumer (urlcode-ai) therefore needs custom deployment and local-development glue that parses the policy JSON and exports its projectSha256 before every dev, validate, test, and serve invocation.
The two values describe the same operator-reviewed revision, but can drift or be omitted independently. The runtime fails closed, which is safe, but the setup makes every extension-using site reproduce a policy-parsing script and adds a configuration failure mode unrelated to its app behavior.
Proposed behavior and alternatives
When a CLI command receives both --policy and --host-file, make the verified policy revision available to composeHost() as the host revision pin, without exposing policy contents or allowing YAML to choose a pin. Keep the host registration equality check.
If automatic propagation is too implicit, provide one official operator-controlled flag or helper that derives the pin from the policy file, so sites do not parse policy JSON themselves.
The design must preserve the existing trust boundary: the application project never supplies the pin, and an absent/mismatched reviewed policy remains a refusal.
Evidence
The urlcode-ai MCP-extension migration uses scripts/policy-revision.mjs locally and equivalent container entrypoint logic solely to bridge URLCODE_OPERATOR_POLICY.projectSha256 into PROJECT_SHA256 for host.mjs.
Decision (owner, 2026-09-25): automatic. When a CLI command receives both --policy and --host-file, core passes the verified policy's projectSha256 to composeHost() as the host revision pin. No new flag, and never from project YAML.
PROJECT_SHA256 keeps working. If it is set as well, it must equal the policy revision, otherwise the command refuses.
The host registration equality check stays, and an absent or mismatched reviewed policy is still refused.
Policy contents other than the revision are not exposed to the host.
Activity
jimhoyd commentedon Sep 25, 2026
Decision (owner, 2026-09-25): automatic. When a CLI command receives both
--policyand--host-file, core passes the verified policy'sprojectSha256tocomposeHost()as the host revision pin. No new flag, and never from project YAML.PROJECT_SHA256keeps working. If it is set as well, it must equal the policy revision, otherwise the command refuses.Generated by Claude Code
feat(core): authoring fixture/diff tools, automatic host revision pin…