Skip to content

feat: unify outcome-capture consent with gateway tenant-level opt-in - #446

Merged
dahai80 merged 1 commit into
mainfrom
feat/outcome-consent-442
Dec 1, 2026
Merged

dahai80 merged 1 commit into
mainfrom
feat/outcome-consent-442

Conversation

@dahai80

@dahai80 dahai80 commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Closes #442 (fusion-code side of the consent unification; gw#755 provisioning is the gateway counterpart).

Consent resolution order

  1. Gateway tenant policy (gw#755 flag, provisioned via the admin/config surface as <configDir>/tenant-policy.json with {"outcome_capture":"on"|"off"}) — tenant-explicit ON/OFF both win over the machine env.
  2. Machine env FUSION_CODE_OUTCOME_CAPTURE=1 (strict "1") — local-first v1 surface.
  3. Default OFF.

Fail-closed: missing policy file falls through to env; malformed JSON or unknown value = OFF (resolution failure never falls through to env).

Diagnostics

fusion-code outcome status — one line: outcome capture: on|off (source: tenant|env|default-off).

Verification

  • Table-driven tests per acceptance: tenant on + env off = on; tenant off + env on = off; no config + env off = off; no config + env on = on; malformed = off; unknown value = off
  • Full suites: 1315 unit + 543 integration pass; tsc 0; lint clean; build OK; CLI smoke green

🤖 Generated with Claude Code

Consent resolution order: gateway tenant policy (gw#755 provisioned
<configDir>/tenant-policy.json, {"outcome_capture":"on"|"off"})
> machine env FUSION_CODE_OUTCOME_CAPTURE (strict "1") > default OFF.

- Tenant-explicit ON/OFF both win over machine env (central opt-in contract)
- Fail-closed: missing file falls to env; malformed/unknown value = OFF
  (resolution failure never falls through to env) — table-driven tests
- Diagnostics: fusion-code outcome status — one-line effective consent
  state (on/off + source: tenant|env|default-off)
- Docs updated; gates: tsc 0, lint clean, 1315 unit + 543 integration,
  build OK, CLI smoke green

Co-Authored-By: Claude Code <[email protected]>
@dahai80
dahai80 merged commit 9cfa8f6 into main Dec 1, 2026
2 checks passed
@dahai80
dahai80 deleted the feat/outcome-consent-442 branch December 1, 2026 08:44
@dahai80 dahai80 mentioned this pull request Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unify outcome-capture consent with gateway tenant-level opt-in (follow-up to #431 acceptance)

1 participant