diff --git a/architecture/adrs/ADR-0007-openai-advisory-binding.md b/architecture/adrs/ADR-0007-openai-advisory-binding.md new file mode 100644 index 0000000..a911dd9 --- /dev/null +++ b/architecture/adrs/ADR-0007-openai-advisory-binding.md @@ -0,0 +1,43 @@ +# ADR-0007 — OpenAI Creator advisory binding + +Status: Accepted +Date: 2026-08-16 +Accepted under: ARCH-000010 + +## Decision + +1. The first real provider class for `creator-advisory-v1` is OpenAI at the fixed HTTPS origin `https://api.openai.com`, using `POST /v1/responses`. +2. Binding revision 1 targets the immutable model snapshot `gpt-5.4-mini-2026-03-17` with reasoning effort `low`. An alias or another snapshot is a different binding revision and receives no inherited promotion. +3. Requests set `store: false`, are synchronous and single-turn, and contain no tools, functions, conversations, background mode, streaming, files, images, web/file search, MCP, hosted execution, `previous_response_id` or provider memory. +4. Mode A permits only the Creator message explicitly entered for that request plus a fixed data-free system instruction. Automatic excerpts and `PRIVATE_ALLOWED` context are prohibited until a separately evidenced ZDR/MAM binding revision is accepted and promoted. +5. Before each Mode A request the Creator UI must disclose that the message leaves the private network and provider abuse-monitoring retention may be up to 30 days. Submission acknowledges that request only and is not durable blanket consent. +6. `SECRET`, `UNKNOWN`, credentials, authorization/routing identifiers and ambient context never enter the provider payload. Trusted Actor, Principal, Scope, session, workspace, task and binding identifiers remain local authorization/routing data and are not model context. +7. The API key belongs to a dedicated OpenAI project and may be mounted read-only only into `cognitive-worker` as a secret file. It is absent from Git, databases, images, environment variables, logs, browser state and other containers. +8. Adapter implementation must use the standard library, fixed origin, normal TLS verification, disabled redirects and ambient proxies, strict request/response types, a 30-second deadline, no automatic retry and no request/response body logging. +9. Provider output is advisory text only. Tool/executable/unknown output items, invalid JSON, origin changes, oversize output or malformed text fail closed and are never partially displayed. +10. Initial canary limits are one in-flight request, five accepted requests per minute and fifty per day for the single Creator. A provider project spend limit and alert are required before any production key is mounted. +11. Production activation requires adversarial fake-server tests, a synthetic/public evaluation record, shadow evidence and explicit promotion of the exact binding revision. This ADR alone does not authorize a real key, network egress or production call. + +## Rationale + +The existing provider-neutral boundary makes cognition replaceable and non-canonical. A dated snapshot preserves reproducibility and prevents silent model drift. Mode A enables a narrow explicit advisory use while making the provider's default retention boundary visible and forbidding automatic private context. Isolation and fail-closed mapping preserve the Assistant when cognition is absent or malformed. + +## Consequences + +- A provider adapter may be implemented under `adapters/models` and exercised only against adversarial local fake servers before promotion. +- The cognitive worker still has no canonical owner, database role, Commit/Executor credential or external mutation path. +- Existing `creator-advisory-v1` contracts do not change. +- The deterministic fake remains the only production binding until a separate evaluation/credential/promotion task succeeds. +- A ChatGPT or Codex subscription does not substitute for a dedicated API project, API billing controls or API key. + +## Rollback + +Disable or retire the OpenAI binding and resolve all requests to `deterministic-fake`, returning `PROVIDER_UNAVAILABLE`. No canonical repair or migration is needed because advisory request/response state is not persisted. + +## Revisit triggers + +- OpenAI publishes or withdraws a model snapshot. +- ZDR/MAM is approved for the exact API project. +- Context excerpts, conversation persistence, tools, streaming or multimodal input are requested. +- Evaluation shows the snapshot, effort, limits, latency or cost are unsuitable. +- Provider policy, retention, region, endpoint or origin changes. diff --git a/architecture/adrs/README.md b/architecture/adrs/README.md index e617bac..0b9eb89 100644 --- a/architecture/adrs/README.md +++ b/architecture/adrs/README.md @@ -4,4 +4,4 @@ Accepted architecture decisions live here. Normal implementation tasks may read Use `ADR-XXXX-title.md` with: problem, evidence, alternatives, decision, rationale, consequences, validity conditions, revisit triggers, migration/rollback, status. -Current decisions include `ADR-0006-creator-advisory-boundary.md`, the fail-closed provider-neutral advisory boundary. +Current decisions include `ADR-0006-creator-advisory-boundary.md`, the fail-closed provider-neutral advisory boundary, and `ADR-0007-openai-advisory-binding.md`, the accepted but not yet production-enabled OpenAI binding class. diff --git a/dev/ACTIVE_TASK.json b/dev/ACTIVE_TASK.json index f36c892..cafbdaa 100644 --- a/dev/ACTIVE_TASK.json +++ b/dev/ACTIVE_TASK.json @@ -1,5 +1,5 @@ { - "task_file": "dev/tasks/ARCH-000009-openai-advisory-binding-proposal.json", - "task_id": "ARCH-000009", + "task_file": "dev/tasks/ARCH-000010-accept-openai-advisory-binding.json", + "task_id": "ARCH-000010", "task_revision": 1 } diff --git a/dev/tasks/ARCH-000010-accept-openai-advisory-binding.json b/dev/tasks/ARCH-000010-accept-openai-advisory-binding.json new file mode 100644 index 0000000..b273db3 --- /dev/null +++ b/dev/tasks/ARCH-000010-accept-openai-advisory-binding.json @@ -0,0 +1,23 @@ +{ + "task_id": "ARCH-000010", + "task_revision": 1, + "architecture_revision": "ADR-0006", + "base_repo_revision": "835c62cc1d63348b11e0035ceda68965be0d760a", + "risk_tier": "E", + "intent": "Accept the ARCH-000009 recommendation as the first real Creator advisory provider binding class: OpenAI Responses API, immutable gpt-5.4-mini snapshot and Mode A per-request disclosure, while keeping production egress and credential activation subject to separate implementation, evaluation and promotion tasks.", + "requirement_ids": ["ADR-0006", "ARCH-000009", "INV-EPI-001"], + "allowed_change_scope": {"modules": [], "paths": ["architecture/adrs/ADR-0007-openai-advisory-binding.md", "architecture/adrs/README.md", "docs/OPENAI_ADVISORY_BINDING_PROPOSAL.md", "dev/ACTIVE_TASK.json", "dev/tasks/ARCH-000010-accept-openai-advisory-binding.json"]}, + "forbidden_change_scope": {"paths": ["architecture/ARCHITECTURE_CONSTITUTION.md", "architecture/CORE_SEMANTIC_MODEL_V1.md", "architecture/architecture-registry.*", "ci/**", ".gitea/**", "contracts/**", "modules/**", "adapters/**", "cmd/**", "database/**", "deploy/**", "security/**", "tests/**"]}, + "allowed_architecture_delta": {"new_cross_module_dependencies": 0, "new_canonical_owners": 0, "new_privileges": 0, "new_third_party_dependencies": 0}, + "contracts": {"consume": ["creator-advisory-v1", "ADR-0006", "ARCH-000009 proposal"], "may_change": []}, + "semantic_owner": "none-architecture-decision", + "canonical_state": [], + "state_transitions": [], + "side_effects_and_privileges": ["accept ADR-0007", "authorize a separately scoped fake-server adapter implementation", "no API key, provider call, egress or production activation"], + "persistence_and_migrations": [], + "failure_retry_restart": ["deterministic fake remains production fallback", "no automatic provider retry", "invalid or unavailable provider response fails closed"], + "assumptions": ["the Creator's continuation after the explicit recommendation accepts OpenAI, the fixed snapshot and Mode A retention disclosure", "a later production promotion still requires a dedicated OpenAI project/key and spend controls", "docker-test remains prohibited"], + "acceptance_scenarios": ["ADR fixes provider origin, endpoint, model snapshot and Mode A data policy", "tools, provider memory and automatic context remain forbidden", "implementation may use only adversarial local fake transport until a later promotion task", "real key and production egress remain disabled", "rollback preserves deterministic PROVIDER_UNAVAILABLE"], + "required_tests": ["architecture preflight", "exact diff scope", "CI", "cold-readable ADR review"], + "terminal_gap_states": ["BLOCKED_BY_ARCHITECTURE_GAP", "BLOCKED_BY_SPEC_GAP", "BLOCKED_BY_CONFLICT"] +} diff --git a/docs/OPENAI_ADVISORY_BINDING_PROPOSAL.md b/docs/OPENAI_ADVISORY_BINDING_PROPOSAL.md index e384b9f..93b1556 100644 --- a/docs/OPENAI_ADVISORY_BINDING_PROPOSAL.md +++ b/docs/OPENAI_ADVISORY_BINDING_PROPOSAL.md @@ -1,6 +1,7 @@ # OpenAI advisory binding proposal V1 -Status: **PROPOSED — not accepted and not enabled** +Status: **ACCEPTED by ADR-0007 — not production-enabled** + Task: `ARCH-000009` revision 1 Parent boundary: `ADR-0006`