diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index ea265fdc2..0da8d461b 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -90,11 +90,11 @@ The arrows from foreign owners carry immutable evidence identities only. Noema d Protected source includes a library-only Agent Runtime aggregate for bounded procedural guidance. `src/agent-runtime/procedural-graph.ts` admits one immutable tenant/task/graph snapshot, canonicalizes nodes and directed relationships, computes local content/structure digests, and pins a module-admitted session to one canonical execution identity. `src/agent-runtime/procedural-evolution.ts` screens a direct child graph against paired held-out evidence but always returns `activationAuthorized: false`; eligibility is evidence for a later independent approval boundary, not permission to publish or execute a graph. `src/agent-runtime/procedural-execution.ts` additionally projects guidance only when its caller supplies a fresh authenticated `running` lifecycle snapshot for the same execution identity; it does not itself become durable lifecycle or revocation authority. -On this active branch, candidate `src/agent-runtime/procedural-current-lifecycle.ts` adds a workflow-backed current-state ACL over the existing execution-scoped Workflow / Task Execution Durable Object. The ACL re-admits the workflow plan and validates the locally admitted procedural session against the same canonical execution identity before it selects or reads any Durable Object. It then performs the existing private workflow-state `read`, validates current execution/plan/task/cancellation evidence, and projects only a conservative Agent Runtime lifecycle state into the already-protected running-only procedural gate. Current cancellation, terminal work and pre-start evidence suppress guidance. The ACL cannot mutate workflow state, create lifecycle transitions or retries, grant tools or Policy / Approval, or authorize graph activation. +Protected source `src/agent-runtime/procedural-current-lifecycle.ts` provides a workflow-backed current-state ACL over the existing execution-scoped Workflow / Task Execution Durable Object. The ACL re-admits the workflow plan and validates the locally admitted procedural session against the same canonical execution identity before it selects or reads any Durable Object. It then performs the existing private workflow-state `read`, validates current execution/plan/task/cancellation evidence, and projects only a conservative Agent Runtime lifecycle state into the already-protected running-only procedural gate. Current cancellation, terminal work and pre-start evidence suppress guidance. The ACL cannot mutate workflow state, create lifecycle transitions or retries, grant tools or Policy / Approval, or authorize graph activation. The aggregate deliberately owns only Noema runtime mechanics. Procedural text is inert advisory data and is not tool authority, Policy / Approval, a prompt-injection verdict, a secret/PII scrubber, or product-domain truth. Graph/session WeakSet admission prevents structural lookalikes from becoming local runtime capabilities. Unknown procedures and context-budget overflow abstain without a hidden full-graph fallback. Execution identities reuse the canonical Agent Runtime grammar rather than defining a second identity domain. -Cross-product ownership remains outside this protected advisory boundary: released wire contracts belong to `context-graph-contracts`, enterprise adoption/decision records to `enterprise-architecture-core`, model routing to `contextual-orchestrator`, credentials to Keyverse, and graph content/evaluation truth to the owning product. Mutable sibling PR heads are not consumed. ADR 0017 remains `Proposed`; protected source integration plus the active workflow-backed ACL candidate do not establish authenticated evaluation receipts, durable graph history, non-workflow current-lifecycle revocation, Policy / Approval CAS, deployed Durable Object behavior, canary/rollback evidence, production activation, or organization-wide self-evolution. +Cross-product ownership remains outside this protected advisory boundary: released wire contracts belong to `context-graph-contracts`, enterprise adoption/decision records to `enterprise-architecture-core`, model routing to `contextual-orchestrator`, credentials to Keyverse, and graph content/evaluation truth to the owning product. Mutable sibling PR heads are not consumed. ADR 0017 remains `Proposed`; protected source integration does not establish authenticated evaluation receipts, durable graph history, non-workflow current-lifecycle revocation, Policy / Approval CAS, deployed Durable Object behavior, canary/rollback evidence, production activation, or organization-wide self-evolution. ## 5. Evidence and authority separation @@ -142,7 +142,7 @@ Durable Object alarms are at-least-once. Handlers reread current deadline/expiry Protected source includes separate Durable Object storage semantics for external-extension lifecycle evidence. The event log is append-only and is not the bounded Workflow / Task receipt ledger. Event/request digests are computed outside the short transaction; the transaction revalidates expected version, prior state, and prior head digest before atomically writing event + idempotency index + compact head. `readCurrent()` verifies only the head and exact tail for the latency-sensitive path, whereas `readAudit()` verifies every retained version/hash link and final head/tail identity. Corrupt or truncated durable state is a conflict, never an empty stream. Recovery and rollback must preserve acknowledged history and follow `docs/external-extension-lifecycle-recovery.md`. -The protected procedural-graph source itself remains intentionally non-durable. A graph digest or successful held-out screen is not retained activation authority. Candidate #589 reuses the existing durable Workflow / Task Execution state only as current task/cancellation evidence for workflow-backed advisory gating; it does not persist graph history, approval, or activation state and does not replace Agent Runtime lifecycle ownership. Durable graph/rejection history, authenticated evaluation receipts, non-workflow current-lifecycle revocation, approval CAS, canary state, rollback and recovery require later owner-approved boundaries; adding those concerns directly to the library aggregate would collapse State / Checkpoint, Policy / Approval, and product-domain ownership. +The protected procedural-graph source itself remains intentionally non-durable. A graph digest or successful held-out screen is not retained activation authority. Protected #589 reuses the existing durable Workflow / Task Execution state only as current task/cancellation evidence for workflow-backed advisory gating; it does not persist graph history, approval, or activation state and does not replace Agent Runtime lifecycle ownership. Durable graph/rejection history, authenticated evaluation receipts, non-workflow current-lifecycle revocation, approval CAS, canary state, rollback and recovery require later owner-approved boundaries; adding those concerns directly to the library aggregate would collapse State / Checkpoint, Policy / Approval, and product-domain ownership. ## 9. Standalone and modular MSA contract @@ -174,7 +174,7 @@ Repository source/docs cannot fabricate stronger live `main` governance than the Protected external-extension lifecycle source cannot establish actual Durable Object p95, contention/partition behavior, backup/restore success, production recovery, or deployed invocation enforcement by documentation alone. Those remain later exact operational evidence. -Protected procedural-graph source and candidate #589 cannot establish authenticated evaluation provenance, cross-language/released digest semantics, durable graph version history, non-workflow current-lifecycle revocation, approval, deployed workflow-state ACL behavior, canary operation, rollback success, or production outcome improvement. Those remain later contract, Policy / Approval, operational, and product-owner evidence. +Protected procedural-graph source, including #589, cannot establish authenticated evaluation provenance, cross-language/released digest semantics, durable graph version history, non-workflow current-lifecycle revocation, approval, deployed workflow-state ACL behavior, canary operation, rollback success, or production outcome improvement. Those remain later contract, Policy / Approval, operational, and product-owner evidence. ## 12. Canonical documentation graph @@ -199,6 +199,6 @@ The default shape is **small credential-exchange service + explicit state coordi The external-extension lifecycle remains a bounded Tool Capability / State / Checkpoint aggregate rather than a new scanner, quarantine runtime, egress engine, identity provider, or model router. Its synchronous projection path and full audit/recovery path are deliberately separate so buyer/runtime latency does not require scanning retained history while recovery still verifies the complete chain. -The protected procedural-graph advisory remains a bounded Agent Runtime aggregate rather than an execution engine or autonomous policy plane. Its pure execution adapter may project localized context against a caller-supplied fresh authenticated same-execution `running` lifecycle snapshot. On this active branch, candidate #589 adds only a workflow-backed current-state ACL: it reuses the existing canonical Workflow / Task Execution durable owner for fresh task/cancellation evidence and rejects plan/session execution mismatch before durable lookup. Any future graph persistence, release, approval, non-workflow current-lifecycle revocation, canary, or activation path must cross explicit versioned owner contracts and retain `activationAuthorized: false` until those independent authorities are proven. +The protected procedural-graph advisory remains a bounded Agent Runtime aggregate rather than an execution engine or autonomous policy plane. Its pure execution adapter may project localized context against a caller-supplied fresh authenticated same-execution `running` lifecycle snapshot. Protected #589 adds only a workflow-backed current-state ACL: it reuses the existing canonical Workflow / Task Execution durable owner for fresh task/cancellation evidence and rejects plan/session execution mismatch before durable lookup. Any future graph persistence, release, approval, non-workflow current-lifecycle revocation, canary, or activation path must cross explicit versioned owner contracts and retain `activationAuthorized: false` until those independent authorities are proven. Architecture changes must keep source behavior, realistic regression tests, canonical documentation, traceability, and CHANGELOG semantics consistent without promoting active-PR behavior to protected truth. diff --git a/docs/PRD.md b/docs/PRD.md index a613eac67..8a758b8b8 100644 --- a/docs/PRD.md +++ b/docs/PRD.md @@ -106,7 +106,7 @@ Protected `main` includes a bounded **procedural graph advisory runtime** inside Protected source also includes the #586 execution-lifecycle adapter. It projects procedural guidance only when the caller supplies a fresh authenticated `running` lifecycle snapshot for the same canonical execution identity and suppresses guidance for accepted, cancellation-requested, or terminal states. The adapter is not itself durable lifecycle/revocation authority and cannot prove that a canonical `running` snapshot has not become stale after the caller obtained it. -On this active branch, candidate #589 adds a workflow-backed current-state ACL without replacing that pure adapter. It re-admits the workflow plan, validates the locally admitted procedural session against the same canonical execution identity before selecting any execution-scoped Durable Object, then re-reads the existing Workflow / Task Execution owner before each guidance decision. Current cancellation, terminal task evidence, and pre-start evidence suppress guidance; only other current nonterminal workflow evidence can reach the existing running-only advisory gate. This candidate does not make Workflow / Task Execution the Agent Runtime lifecycle store and does not grant mutation, retry, Policy / Approval, tool, release, or activation authority. Non-workflow Agent Runtime callers still require their own fresh authenticated lifecycle source, and source/fake-Durable-Object tests do not establish deployed Durable Object compatibility, restart behavior, availability, or synchronous buyer-path p95. +Protected source includes the #589 workflow-backed current-state ACL without replacing that pure adapter. It re-admits the workflow plan, validates the locally admitted procedural session against the same canonical execution identity before selecting any execution-scoped Durable Object, then re-reads the existing Workflow / Task Execution owner before each guidance decision. Current cancellation, terminal task evidence, and pre-start evidence suppress guidance; only other current nonterminal workflow evidence can reach the existing running-only advisory gate. This protected ACL does not make Workflow / Task Execution the Agent Runtime lifecycle store and does not grant mutation, retry, Policy / Approval, tool, release, or activation authority. Non-workflow Agent Runtime callers still require their own fresh authenticated lifecycle source, and source/fake-Durable-Object tests do not establish deployed Durable Object compatibility, restart behavior, availability, or synchronous buyer-path p95. Procedural graph ownership follows existing CWL boundaries. Any released cross-service schema belongs to `context-graph-contracts`; enterprise adoption/decision records belong to `enterprise-architecture-core`; model discovery/routing remains in `contextual-orchestrator`; credentials remain in Keyverse; graph content and outcome/evaluation truth remain with the consuming product. Noema owns only the execution-local advisory mechanics and deterministic candidate-screening port. Mutable sibling PR heads are not production dependencies. @@ -137,7 +137,7 @@ Procedural graph ownership follows existing CWL boundaries. Any released cross-s | FR-021 | Model discovery, routing, test-time compute, provider failover, and provider credentials remain owned by `contextual-orchestrator`; Noema runtime code must not duplicate direct provider SDKs, credentials, fallback lists, or routing policy. | | FR-022 | Workflow/task, tool/capability, isolation, policy/approval, observability, recovery, Context Graph, and EA integration must cross explicit versioned ports/contracts; Context Graph integration must use immutable released versioned contracts, reject open or unreleased Draft contracts, and require conformance/admission evidence, canonical object/authority references, provenance, and valid/system time semantics. Arbitrary tool authority, ambient secret propagation, unbounded recursive work, silent side-effect retry, unreleased Context Graph source coupling, and cross-service SQL are forbidden. | | FR-023 | External-extension lifecycle authority must be append-only, exact-stream partitioned, restart-reconstructable, and CAS-serialized; current projection must be cryptographically bound to its audit tail, full audit must detect sequence/hash/stream truncation or substitution, exact duplicate replay must preserve committed history, and every genuinely new activation must bind a fresh Noema Policy / Approval and owner-evidence re-read without copying foreign-owner truth. | -| FR-024 | Procedural graph guidance must remain tenant/task/execution scoped, immutable and advisory-only; reject forged graph/session identities and unsafe input, return bounded localized context or explicit abstention, bind candidate screening to exact direct-child lineage and paired held-out context, prevent train/holdout leakage, reject safety or measured-score regression, and keep activation unauthorized. The protected pure adapter requires a caller-supplied fresh authenticated same-execution `running` lifecycle snapshot. For workflow-backed guidance on this active branch, the plan/session execution identity must match before any execution-scoped durable lookup and the canonical Workflow / Task Execution owner must be re-read before every decision. Non-workflow lifecycle freshness, released contracts, authenticated evaluation evidence, Policy / Approval, durable graph/rejection history, deployment evidence and rollout authority remain separate prerequisites. | +| FR-024 | Procedural graph guidance must remain tenant/task/execution scoped, immutable and advisory-only; reject forged graph/session identities and unsafe input, return bounded localized context or explicit abstention, bind candidate screening to exact direct-child lineage and paired held-out context, prevent train/holdout leakage, reject safety or measured-score regression, and keep activation unauthorized. The protected pure adapter requires a caller-supplied fresh authenticated same-execution `running` lifecycle snapshot. For protected workflow-backed guidance, the plan/session execution identity must match before any execution-scoped durable lookup and the canonical Workflow / Task Execution owner must be re-read before every decision. Non-workflow lifecycle freshness, released contracts, authenticated evaluation evidence, Policy / Approval, durable graph/rejection history, deployment evidence and rollout authority remain separate prerequisites. | ## 6. Non-functional requirements @@ -234,4 +234,4 @@ An earlier stage never proves a later stage. - `docs/external-extension-lifecycle-recovery.md` — dedicated external-extension restart, audit-chain, corruption, CAS-contention, and rollback recovery contract. - `docs/DOCUMENTATION_GAP_AUDIT.md` — design sufficiency versus protected-main operational sufficiency. - runtime and automation threat models — distinct threat surfaces. -- `docs/LICENSING_AND_IP_TRANSFER.md` — owner/legal and exact-release rights boundary. \ No newline at end of file +- `docs/LICENSING_AND_IP_TRANSFER.md` — owner/legal and exact-release rights boundary. diff --git a/docs/TRD.md b/docs/TRD.md index fc5147b9e..ad46e54f6 100644 --- a/docs/TRD.md +++ b/docs/TRD.md @@ -62,9 +62,9 @@ Protected source includes four library-only Agent Runtime modules: `procedural-i `guideProceduralExecution()` consumes only a locally admitted procedural session and a caller-supplied fresh authenticated lifecycle snapshot for the same canonical execution identity. It projects bounded advisory context only while that supplied lifecycle is `running`; accepted, cancellation-requested and terminal states suppress guidance. This pure adapter does not persist lifecycle state and cannot independently prove that a previously authenticated `running` snapshot has not become stale. -On this active branch, candidate `guideProceduralExecutionFromCurrentWorkflowState()` adds a workflow-backed freshness ACL without changing the pure adapter's ownership. It first re-admits the workflow plan and validates the locally admitted procedural session against that exact execution identity before any Durable Object is selected or read. It then issues only the existing private Workflow / Task Execution `read` command to the execution-scoped `NOEMA_WORKFLOW_STATE` owner, validates exact execution/plan identity, complete unique task identities, allowed task states, cancellation identity and transition sequence, and projects only the minimum Agent Runtime state needed for the existing running-only advisory gate. Cancellation and terminal work suppress guidance, initialized pre-start evidence remains unavailable, and other current nonterminal workflow evidence may be treated as running for advisory purposes. The ACL cannot claim/mutate tasks, create lifecycle transitions, retry effects, grant Policy / Approval or tool authority, or replace Agent Runtime lifecycle semantics. Cross-execution plan/session mismatch is rejected before another execution's durable owner can be read. +Protected source `guideProceduralExecutionFromCurrentWorkflowState()` provides a workflow-backed freshness ACL without changing the pure adapter's ownership. It first re-admits the workflow plan and validates the locally admitted procedural session against that exact execution identity before any Durable Object is selected or read. It then issues only the existing private Workflow / Task Execution `read` command to the execution-scoped `NOEMA_WORKFLOW_STATE` owner, validates exact execution/plan identity, complete unique task identities, allowed task states, cancellation identity and transition sequence, and projects only the minimum Agent Runtime state needed for the existing running-only advisory gate. Cancellation and terminal work suppress guidance, initialized pre-start evidence remains unavailable, and other current nonterminal workflow evidence may be treated as running for advisory purposes. The ACL cannot claim/mutate tasks, create lifecycle transitions, retry effects, grant Policy / Approval or tool authority, or replace Agent Runtime lifecycle semantics. Cross-execution plan/session mismatch is rejected before another execution's durable owner can be read. -This candidate closes only the cached-workflow-snapshot gap for workflow-backed executions at source level. Non-workflow Agent Runtime callers still require their own fresh authenticated lifecycle source. Fake/in-memory Durable Object tests do not establish deployed transaction compatibility, restart/failure behavior, availability, synchronous buyer-path p95, durable procedural graph/rejection history, approval CAS, canary/rollback, release, deployment, or activation evidence. +This protected ACL closes only the cached-workflow-snapshot gap for workflow-backed executions at source level. Non-workflow Agent Runtime callers still require their own fresh authenticated lifecycle source. Fake/in-memory Durable Object tests do not establish deployed transaction compatibility, restart/failure behavior, availability, synchronous buyer-path p95, durable procedural graph/rejection history, approval CAS, canary/rollback, release, deployment, or activation evidence. Released cross-service procedural graph schemas belong to `context-graph-contracts`; enterprise adoption records belong to `enterprise-architecture-core`; model discovery/routing remains owned by `contextual-orchestrator`; credentials remain in Keyverse; graph content and product outcome truth remain with the consuming product. No mutable sibling PR-head dependency is accepted as production authority. ADR 0017 remains `Proposed`: protected source integration is not release, deployment, approval, canary or activation evidence. @@ -347,7 +347,7 @@ The protected procedural graph source is intentionally non-durable: graph/sessio Protected source implements procedural graph admission/session, offline direct-child candidate screening, and the #586 lifecycle-gated advisory projection with hostile tests for malformed descriptors, forged local authority, graph identity/scope, resource bounds, cycle-safe traversal, abstention, lineage/context mismatch, train/holdout leakage, paired evidence completeness, safety regression, measured-score regression, same-execution lifecycle binding, and non-running suppression. ADR 0017 remains `Proposed`; root architecture and traceability retain graph content as advisory-only and activation as unauthorized. This source is not a deployed route, durable graph store, model refiner, signed receipt verifier, automatic activation system, current-state revocation authority, or organization rollout. -On this active branch, the workflow-backed current-state ACL reuses the protected Workflow / Task Execution Durable Object only as current task/cancellation evidence for procedural guidance. It does not persist procedural graphs or create a second lifecycle database, and it validates local session/execution identity before any execution-scoped durable read. This candidate narrows stale workflow-backed guidance at source level but does not establish deployed Durable Object behavior, universal lifecycle freshness, Policy / Approval promotion, or rollout authority. +Protected source reuses the Workflow / Task Execution Durable Object only as current task/cancellation evidence for procedural guidance through the #589 workflow-backed current-state ACL. It does not persist procedural graphs or create a second lifecycle database, and it validates local session/execution identity before any execution-scoped durable read. This protected ACL narrows stale workflow-backed guidance at source level but does not establish deployed Durable Object behavior, universal lifecycle freshness, Policy / Approval promotion, or rollout authority. ## Implemented @@ -356,7 +356,7 @@ On this active branch, the workflow-backed current-state ACL reuses the protecte - Worker routing, OIDC/GitHub App exchange, bounded request/egress controls. - distributed rate-limit and OIDC replay Durable Objects. - external-extension admission and append-only lifecycle storage/runtime binding, while real-backend operational/activation evidence remains separate. -- procedural graph local admission/session, deterministic direct-child screening, and lifecycle-gated advisory projection while durable revocation/approval/rollout evidence remains separate. +- procedural graph local admission/session, deterministic direct-child screening, lifecycle-gated advisory projection, and workflow-backed current-state ACL while durable revocation/approval/rollout evidence remains separate. - central-review/commercial-readiness/product-development/readiness/acquisition workflow 계열과 policy/test 기반. - evidence-class separation을 반영한 maintenance policy code. - configured 100% production coverage and reviewer-quality gates. @@ -386,4 +386,4 @@ repository source만으로 충족되지 않는 항목: ## 17. References -설계의 표준·primary-source 근거와 APA 7th bibliography는 `docs/doctoring/architecture-trust-boundaries.md`를 canonical source로 사용합니다. 세부 API/운영 근거는 해당 doctoring/runbook의 source verification note를 따릅니다. External-extension lifecycle recovery procedure is `docs/external-extension-lifecycle-recovery.md`; lifecycle architecture remains governed by ADR 0015 and the canonical Context Map. Procedural graph method provenance and adoption evidence are documented in ADR 0017 and `docs/doctoring/procedural_graph_adoption.md`; method citations do not become CWL production evidence. \ No newline at end of file +설계의 표준·primary-source 근거와 APA 7th bibliography는 `docs/doctoring/architecture-trust-boundaries.md`를 canonical source로 사용합니다. 세부 API/운영 근거는 해당 doctoring/runbook의 source verification note를 따릅니다. External-extension lifecycle recovery procedure is `docs/external-extension-lifecycle-recovery.md`; lifecycle architecture remains governed by ADR 0015 and the canonical Context Map. Procedural graph method provenance and adoption evidence are documented in ADR 0017 and `docs/doctoring/procedural_graph_adoption.md`; method citations do not become CWL production evidence. diff --git a/docs/doctoring/procedural_graph_adoption.md b/docs/doctoring/procedural_graph_adoption.md index c04d3c6be..6ab711324 100644 --- a/docs/doctoring/procedural_graph_adoption.md +++ b/docs/doctoring/procedural_graph_adoption.md @@ -5,17 +5,18 @@ Date: 2026-09-10. This record accompanies [ADR-0017](../adr/0017-procedural-graph-guidance.md), [Noema #584](https://github.com/ContextualWisdomLab/noema/issues/584), -[core #585](https://github.com/ContextualWisdomLab/noema/pull/585), and -[lifecycle #586](https://github.com/ContextualWisdomLab/noema/pull/586). +[core #585](https://github.com/ContextualWisdomLab/noema/pull/585), +[lifecycle #586](https://github.com/ContextualWisdomLab/noema/pull/586), and +[current-state ACL #589](https://github.com/ContextualWisdomLab/noema/pull/589). The organization work item is [CWL #2067](https://github.com/ContextualWisdomLab/.github/issues/2067). The canonical EA adoption matrix belongs to enterprise-architecture-core, not this document. -Protected source integration: #585 and #586 are merged on protected `main`. +Protected source integration: #585, #586, and #589 are merged on protected `main`. This is source-integration evidence only. ADR 0017 remains `Proposed`, candidate screening remains `activationAuthorized: false`, and release, deployment, authenticated evaluation, durable promotion, shadow/canary, rollback and product-outcome evidence remain separate authorities. The workflow-backed -current-state ACL is tracked in #589 until its own protected integration; this record does not promote -a Draft head into protected or deployed truth. +current-state ACL is protected source; this record does not promote that source integration into +release, deployment, approval, or activation truth. ## What the sources support @@ -39,7 +40,7 @@ than the blog's interpretation or comparative scores. | Scope and identity | Graph tenant/task/digest are compared exactly. Execution IDs use Noema's existing `isCanonicalExecutionId`, not the narrower graph-node grammar. Graph identity and execution identity are different contracts. | | Local object admission | Only frozen graph sessions issued by the owning module may enter the lifecycle adapter. Copied objects, proxy wrappers and forged callbacks are rejected before session property access. This is local object integrity, not caller authentication. | | Unknown or oversized neighborhood | Return unavailable advice for `unknown_procedure` or `context_budget_exceeded`; do not turn abstention into success, return the entire graph, or silently drop prerequisite relationships. | -| Execution lifecycle | The protected pure adapter accepts only a caller-supplied fresh authenticated lifecycle snapshot. For workflow-backed sessions, #589 adds a candidate ACL that re-reads the existing execution-scoped `NOEMA_WORKFLOW_STATE` owner before every guidance decision and suppresses advice when newer cancellation, terminal, or pre-start durable evidence exists. This is a conservative guidance projection, not a second Agent Runtime lifecycle store. | +| Execution lifecycle | The protected pure adapter accepts only a caller-supplied fresh authenticated lifecycle snapshot. For workflow-backed sessions, protected #589 re-reads the existing execution-scoped `NOEMA_WORKFLOW_STATE` owner before every guidance decision and suppresses advice when newer cancellation, terminal, or pre-start durable evidence exists. This is a conservative guidance projection, not a second Agent Runtime lifecycle store. | | Candidate comparison | Require exact base/candidate lineage, matching evaluation context, complete paired cases, disjoint train/holdout IDs and finite normalized scores. Reported candidate safety violations block eligibility regardless of mean gain. | | Independent acceptance | Arithmetic non-regression is not statistical significance, construct validity, standard setting or approval. Independent evaluation and final confirmation remain prerequisites. | | Data and secrets | No new credential, `.env` read, provider client, raw trajectory store or hidden-reasoning capture is introduced. Guidance text is still untrusted data; these modules do not detect prompt injection or scrub sensitive content. | @@ -77,7 +78,7 @@ Node/npm/Vitest tests, all coverage thresholds, security, review and deployment checks remain independent requirements. No CI threshold, lockfile or runtime version was altered to turn this diagnostic result into acceptance. -Protected source subsequently integrated #585 as merge commit +Protected source integrated #585 as merge commit `3f5aad19e6bb9231ec6bde9724ad0bd51752bf9f` and #586 as merge commit `ae525cdc4ecc28e6caf5e5a45809f568388b3f7f`. #586 exact head `5351723f4ce3c2d41d463555986ba49e6c8f0f20` had terminal-success application CI, @@ -85,20 +86,25 @@ reviewer CI, central Security Scan and patch-validator-image before normal merge Those observations establish protected source integration; they do not establish an immutable release, deployed runtime behavior, graph effectiveness or rollout authority. -#589 starts from the later protected documentation convergence and uses test-first +#589 started from the later protected documentation convergence and used test-first `8565dd32c2111b1f06a91f36bd2d7928834b97e2` to require a fresh durable read for each workflow-backed guidance decision. The causal source reuses the private execution-scoped Workflow / Task Execution `read` command rather than adding another database or mutation endpoint. Its tests deliberately replay a first current response that permits advice followed by a newer cancellation response and require the second -decision to suppress advice. Until #589 has unchanged exact-head hosted evidence and -normal protected integration, that source remains candidate truth. +decision to suppress advice. Exact head `5114729fac942b990368ccfb987f9d2ea267c1a3` +received terminal-success application CI, reviewer CI, central Security Scan and +patch-validator-image before normal merge. Resulting protected merge +`0e899886b039ed27f71bdbc4540ea266b8ef9aed` preserves the previous protected main +and that exact PR head as parents. This proves source integration only; deployed +Durable Object compatibility, restart behavior, availability and synchronous buyer-path +latency remain separate evidence. ## Owner-led rollout and exit criteria | Stage | Responsible owner and concrete next delivery | Exit evidence | | --- | --- | --- | -| Source readiness | Noema: keep #585/#586 aligned and integrate the workflow-backed current-state ACL without crossing Workflow / Task or Agent Runtime ownership. | Protected ancestry plus unchanged exact-head typecheck, full tests/coverage, applicable security/image checks and review. | +| Source readiness | Noema: keep protected #585/#586/#589 behavior aligned with canonical docs without crossing Workflow / Task or Agent Runtime ownership. | Protected ancestry plus unchanged exact-head typecheck, full tests/coverage, applicable security/image checks and review. | | Interchange release | context-graph-contracts #28: graph/context/evaluation/decision schema, digest semantics and hostile conformance fixtures. | Immutable released contract and compatible independent consumer fixtures. Local `noema.procedural-graph/v1` is not already that release. | | Ownership inventory | enterprise-architecture-core #50: task/profile owner, consumer port, contract pin, evaluation profile and rollback owner for each applicable product. | Evidence distinguishes proposed, source, released, shadow, canary, active and rollback-tested. Deterministic kernels may be not applicable with a recorded reason. | | First shadow connection | contextual-orchestrator #1116 plus .github and Naruon owners: connect guide/solver roles through the existing gateway without write-side activation. | Observed matched no-graph/fixed-graph/evolved-graph runs; task success, sequencing errors, duplicate effects, cost/tokens and latency reported separately. | @@ -124,13 +130,13 @@ is necessary for this source slice. ## Remaining gaps that block active adoption -The workflow-backed current-state ACL does not persist Agent Runtime lifecycle state -and does not make Workflow / Task Execution the lifecycle owner. It only prevents a -cached procedural `running` decision from surviving newer durable workflow evidence -that proves cancellation, terminal work, or pre-start state. Non-workflow executions -still need an authenticated current lifecycle source. The deployed Durable Object -read path also still needs real runtime compatibility/restart evidence and buyer-path -p95 measurement; source tests are not latency evidence. +The protected workflow-backed current-state ACL does not persist Agent Runtime +lifecycle state and does not make Workflow / Task Execution the lifecycle owner. +It only prevents a cached procedural `running` decision from surviving newer durable +workflow evidence that proves cancellation, terminal work, or pre-start state. +Non-workflow executions still need an authenticated current lifecycle source. The +deployed Durable Object read path also still needs real runtime compatibility/restart +evidence and buyer-path p95 measurement; source tests are not latency evidence. There is no production graph/trajectory store, signed receipt verifier, automatic refiner, independently approved promotion API or product invocation in protected diff --git a/docs/product-technical-gap-baseline.md b/docs/product-technical-gap-baseline.md index 86bc93c1f..e1ce6775a 100644 --- a/docs/product-technical-gap-baseline.md +++ b/docs/product-technical-gap-baseline.md @@ -4,11 +4,11 @@ 이 문서는 protected source, active candidate, transient workflow evidence와 foreign-owner authority를 분리한다. Open PR exact head, protected base, required workflow, review thread, release와 central dependency는 mutation·merge·release 직전에 다시 읽는다. predecessor GREEN, queued/pending/in-progress/skipped/cancelled run, 오래된 PR base snapshot과 scanner/model judgement는 다음 revision의 merge authority로 전용하지 않는다. queued는 GREEN이 아니다. -Current protected source는 mutation·merge·release 시점에 live protected `main`을 다시 조회해 결정한다. 이 문서 안의 exact source SHA는 dated observation 또는 protected history일 뿐 future merge 뒤 evergreen current authority로 사용하지 않는다. Dated protected observation for this repair는 `main@77dd802f4aa79747054ced9ea75e2d8c54e61250`이며, 이 revision은 merged PR #582 exact `0f20a4dc78e423fd5df49e137a4eb286c7075ea4`의 exact stream-scoped SQLite storage observation primitive, merged #583의 live-authority/ADR-index repair, protected procedural graph source #585/#586, merged #587의 source-vs-rollout doctoring repair, 그리고 merged #588의 canonical documentation convergence를 포함한다. +Current protected source는 mutation·merge·release 시점에 live protected `main`을 다시 조회해 결정한다. 이 문서 안의 exact source SHA는 dated observation 또는 protected history일 뿐 future merge 뒤 evergreen current authority로 사용하지 않는다. Dated protected observation for this repair는 `main@0e899886b039ed27f71bdbc4540ea266b8ef9aed`이며, 이 revision은 merged PR #582 exact `0f20a4dc78e423fd5df49e137a4eb286c7075ea4`의 exact stream-scoped SQLite storage observation primitive, merged #583의 live-authority/ADR-index repair, protected procedural graph source #585/#586, merged #587의 source-vs-rollout doctoring repair, merged #588의 canonical documentation convergence, 그리고 merged #589의 workflow-backed current-state ACL을 포함한다. Moving central control-plane snapshot은 central `.github/main@7fd571dbcdbae6acf29d8f4ee704d7ba6297e4db`다. Noema runtime의 reviewed immutable central consumer pin은 `c9052e607e5f3cc76e73207e7786b21500721b79`이고 runtime authority 표현은 `ALLOWED_WORKFLOW_SHA = c9052e607e5f3cc76e73207e7786b21500721b79`다. Moving foreign head와 reviewed immutable pin을 같은 권위로 취급하지 않으며 central moving head가 전진했다고 consumer pin을 자동 승격하지 않는다. -Protected history에는 merged PR #535 exact `82b20b293f0a5f0ac0e69857c1b61dddfe478491`, merged PR #540 exact `05bc2d47c3899ebe17538070f9a30172f90307ac`, merged PR #542 exact `ca839298fcaeec409091dc909789b6f87eb67fdc`, merged PR #547 exact `30b7e7e5cdab8de65715834a16f994b2047eafa6`, merged PR #550 exact `f2ec2dc6709814070cc3e3d6932ce280aee966db`, merged PR #553 exact `3bd9f543e97ce856f78b1c608141436298ce9e74`, merged PR #558 exact `2f91bf8641212ecae435b5fbcc9084cc0acd6295`, merged PR #556 exact `860714cba46dba06260a5dce09d0e9152fcb0a8c`, merged PR #560 exact `5aab7c098f3478069127f34e398326415ec599a4`와 이후 external-extension lifecycle/operability source integrations #574, #577, #578, #579, #580, #581, #582, documentation-authority integration #583, procedural graph source integrations #585/#586, doctoring integration #587, canonical documentation integration #588이 포함돼 있다. 이 식별자는 역사 증거이지 open-candidate authority가 아니다. +Protected history에는 merged PR #535 exact `82b20b293f0a5f0ac0e69857c1b61dddfe478491`, merged PR #540 exact `05bc2d47c3899ebe17538070f9a30172f90307ac`, merged PR #542 exact `ca839298fcaeec409091dc909789b6f87eb67fdc`, merged PR #547 exact `30b7e7e5cdab8de65715834a16f994b2047eafa6`, merged PR #550 exact `f2ec2dc6709814070cc3e3d6932ce280aee966db`, merged PR #553 exact `3bd9f543e97ce856f78b1c608141436298ce9e74`, merged PR #558 exact `2f91bf8641212ecae435b5fbcc9084cc0acd6295`, merged PR #556 exact `860714cba46dba06260a5dce09d0e9152fcb0a8c`, merged PR #560 exact `5aab7c098f3478069127f34e398326415ec599a4`와 이후 external-extension lifecycle/operability source integrations #574, #577, #578, #579, #580, #581, #582, documentation-authority integration #583, procedural graph source integrations #585/#586, doctoring integration #587, canonical documentation integration #588, workflow-backed current-state integration #589가 포함돼 있다. 이 식별자는 역사 증거이지 open-candidate authority가 아니다. 이 baseline과 executable documentation-authority test는 active documentation-authority lane 하나만 write한다. mutation 직전 open PR/Issue/branch를 fresh-read해 writer를 결정하며 merged/closed historical PR 번호를 active sole writer로 고정하지 않는다. 다른 feature lane의 과거 baseline blob은 ordinary/non-force semantic convergence 때 current authority로 승계하지 않는다. @@ -18,7 +18,7 @@ Noema Core Domain은 Agent Runtime과 Workflow / Task Execution이다. Tool / Ca `contextual-orchestrator`는 provider/model discovery, routing, retry/failover, test-time compute와 provider credential을 소유한다. Noema는 released gateway contract와 canonical `orchestrator/free` alias를 소비하며 direct provider SDK, provider key, provider/model/group fallback policy를 소유하지 않는다. `.github`는 organization reusable workflow/control-plane source다. Keyverse는 identity backend다. `quarantine-sandbox-runtime`, Wardnet, EgressWeave, AppGuardrail은 각자의 isolation/security/outbound/scanning truth를 소유한다. Noema는 그 owner evidence를 reference/pin으로 소비할 뿐 foreign implementation이나 domain table을 복제하지 않는다. Cross-service SQL과 mutable sibling PR dependency는 금지한다. -Baseline의 요구·설계·데이터·경계 authority는 `docs/PRD.md`, `docs/TRD.md`, `docs/UML.md`, `docs/ERD.md`, `docs/CONTEXT_MAP.md`다. 이 register는 그 문서와 ADR을 대체하지 않고 current Gap/Action/Status를 exact source·PR·workflow evidence에 결합한다. ADR 0015는 protected source에 포함됐지만 상태는 `Proposed`이며 production activation-authority integration, deployed lifecycle operability/recovery evidence, immutable shared-contract consumption, live pilot와 release evidence가 남아 있다. ADR 0017도 `Proposed`다. Protected #585/#586은 bounded Noema Agent Runtime advisory graph/session mechanics, deterministic direct-child screening, caller-supplied fresh authenticated lifecycle snapshot에 대한 running-only projection을 구현했다. Active candidate #589는 workflow-backed execution에 한해 기존 execution-scoped Workflow / Task Execution Durable Object를 매 guidance decision 전에 다시 읽고, locally admitted session과 re-admitted plan의 execution identity를 durable lookup 전에 검증하는 current-state ACL을 추가한다. 이 candidate는 두 번째 lifecycle store나 mutation/approval authority가 아니며, non-workflow lifecycle freshness, released wire contracts, authenticated evaluator receipts, durable graph/rejection history, Policy / Approval CAS, deployed Durable Object p95/recovery, canary/rollback과 product-outcome authority는 여전히 별도다. +Baseline의 요구·설계·데이터·경계 authority는 `docs/PRD.md`, `docs/TRD.md`, `docs/UML.md`, `docs/ERD.md`, `docs/CONTEXT_MAP.md`다. 이 register는 그 문서와 ADR을 대체하지 않고 current Gap/Action/Status를 exact source·PR·workflow evidence에 결합한다. ADR 0015는 protected source에 포함됐지만 상태는 `Proposed`이며 production activation-authority integration, deployed lifecycle operability/recovery evidence, immutable shared-contract consumption, live pilot와 release evidence가 남아 있다. ADR 0017도 `Proposed`다. Protected #585/#586은 bounded Noema Agent Runtime advisory graph/session mechanics, deterministic direct-child screening, caller-supplied fresh authenticated lifecycle snapshot에 대한 running-only projection을 구현했다. Protected #589는 workflow-backed execution에 한해 기존 execution-scoped Workflow / Task Execution Durable Object를 매 guidance decision 전에 다시 읽고, locally admitted session과 re-admitted plan의 execution identity를 durable lookup 전에 검증하는 current-state ACL을 추가했다. 이 protected ACL은 두 번째 lifecycle store나 mutation/approval authority가 아니며, non-workflow lifecycle freshness, released wire contracts, authenticated evaluator receipts, durable graph/rejection history, Policy / Approval CAS, deployed Durable Object p95/recovery, canary/rollback과 product-outcome authority는 여전히 별도다. ## Integrated exact-claim evidence — issue #555 / merged PR #556 @@ -62,19 +62,19 @@ This source chain does not complete #561. A genuinely new `active` transition re Operational acceptance still requires the actual deployed SQLite Durable Object: realistic current-read and contended-append denominators with evaluator-computed p95 ≤20 ms where synchronous, exactly-one-winner CAS contention, >128-event audit/restart continuity, malformed/truncated state rejection, exact-object storage growth, PITR or equivalent recovery rehearsal, and deployment/release provenance authenticating the producer. Local/workerd timing, namespace storage charts, synthetic evidence and self-asserted JSON do not satisfy that boundary. -## Protected procedural graph advisory source — issue #584 / merged #585 + #586 +## Protected procedural graph advisory source — issue #584 / merged #585 + #586 + #589 -Protected source includes the library-only Agent Runtime procedural graph aggregate and its execution-lifecycle projection. The graph boundary uses strict descriptor-safe input, immutable tenant/task/graph snapshots, canonical content/structure identities, module-local graph/session admission, canonical execution identity, cycle-safe bounded directed context and explicit unknown/budget abstention. Candidate screening accepts only an admitted direct child under exact paired held-out evidence, rejects training/holdout leakage, incomplete/duplicate cases, invalid scores, candidate safety violations and measured mean regression, and retains `activationAuthorized: false` for every decision. `guideProceduralExecution()` projects context only from a locally admitted session when the caller supplies a fresh authenticated same-execution `running` lifecycle snapshot; accepted, cancellation-requested and terminal states suppress guidance. The adapter does not itself prove lifecycle freshness or own durable revocation. +Protected source includes the library-only Agent Runtime procedural graph aggregate, its execution-lifecycle projection, and the workflow-backed current-state ACL. The graph boundary uses strict descriptor-safe input, immutable tenant/task/graph snapshots, canonical content/structure identities, module-local graph/session admission, canonical execution identity, cycle-safe bounded directed context and explicit unknown/budget abstention. Candidate screening accepts only an admitted direct child under exact paired held-out evidence, rejects training/holdout leakage, incomplete/duplicate cases, invalid scores, candidate safety violations and measured mean regression, and retains `activationAuthorized: false` for every decision. `guideProceduralExecution()` projects context only from a locally admitted session when the caller supplies a fresh authenticated same-execution `running` lifecycle snapshot; accepted, cancellation-requested and terminal states suppress guidance. Protected #589 adds a read-only workflow-backed ACL that verifies session/plan execution identity before durable lookup and re-reads the existing Workflow / Task Execution owner before every decision so current cancellation, terminal work and pre-start evidence suppress guidance. Neither adapter becomes a second lifecycle store or approval/activation authority. Noema does not absorb downstream owners to complete this lane. Released procedural graph wire/schema identity belongs to `context-graph-contracts`; enterprise adoption and decision records to `enterprise-architecture-core`; model discovery/routing to `contextual-orchestrator`; credentials to Keyverse; graph content, evaluation design and production outcome truth to the consuming product. Protected graph/session identity, `eligibleForApproval`, or a caller-supplied lifecycle snapshot are local deterministic/runtime evidence, not signatures, durable state, Policy / Approval or activation authority. This source adds no provider SDK/key, persistent graph store, HTTP route, automatic model refiner, tool authority or activation path. -Source integration is complete for #585/#586. ADR 0017 remains `Proposed` until immutable released contracts, authenticated evaluation receipts, durable graph/rejection history plus current-lifecycle/revocation authority, Policy / Approval CAS, canary/rollback evidence and product-owner production outcome evidence exist. Canonical documentation must describe that separation without treating historical PR numbers as moving current authority. +Source integration is complete for #585/#586/#589. ADR 0017 remains `Proposed` until immutable released contracts, authenticated evaluation receipts, durable graph/rejection history plus current-lifecycle/revocation authority, Policy / Approval CAS, deployed Workflow / Task Execution compatibility and synchronous buyer-path p95 evidence, canary/rollback evidence and product-owner production outcome evidence exist. Canonical documentation must describe that separation without treating historical PR numbers as moving current authority. -## Active workflow-backed procedural current-state candidate — PR #589 +## Protected workflow-backed procedural current-state ACL — merged PR #589 -Draft #589 adds a read-only Agent Runtime ACL over the existing execution-scoped Workflow / Task Execution Durable Object. Every workflow-backed guidance decision re-admits the plan, verifies that the locally admitted procedural session has the same canonical execution identity before any Durable Object lookup, then reads current workflow state through the existing private `read` command. Exact execution/plan identity, complete unique task identities, allowed task states, cancellation identity and transition sequence are validated before a conservative lifecycle projection reaches the protected running-only procedural gate. Current cancellation, terminal work and pre-start evidence suppress guidance. Cross-execution mismatch is rejected without reading the foreign execution object. +Merged #589 adds a read-only Agent Runtime ACL over the existing execution-scoped Workflow / Task Execution Durable Object. Every workflow-backed guidance decision re-admits the plan, verifies that the locally admitted procedural session has the same canonical execution identity before any Durable Object lookup, then reads current workflow state through the existing private `read` command. Exact execution/plan identity, complete unique task identities, allowed task states, cancellation identity and transition sequence are validated before a conservative lifecycle projection reaches the protected running-only procedural gate. Current cancellation, terminal work and pre-start evidence suppress guidance. Cross-execution mismatch is rejected without reading the foreign execution object. -This candidate does not create a second lifecycle database, mutate Workflow / Task Execution state, grant retry/tool/Policy / Approval authority, or turn graph/evaluation data into activation truth. The source-level ACL also does not prove deployed Durable Object compatibility, restart/failure behavior, synchronous p95, non-workflow lifecycle freshness, immutable release, graph persistence/promotion, canary/rollback or product outcome. Those remain later acceptance classes under issue #584. +This protected ACL does not create a second lifecycle database, mutate Workflow / Task Execution state, grant retry/tool/Policy / Approval authority, or turn graph/evaluation data into activation truth. Source integration also does not prove deployed Durable Object compatibility, restart/failure behavior, synchronous p95, non-workflow lifecycle freshness, immutable release, graph persistence/promotion, canary/rollback or product outcome. Those remain later acceptance classes under issue #584. ## Evidence and merge rules @@ -92,7 +92,7 @@ PR 0은 useful work를 닫아 제조하지 않는다. Open lane은 normal merge | --- | --- | --- | --- | --- | --- | --- | | P0 | Exact-claim evidence supply chain | Tool/research claim이 producer evidence 없이 reviewer authority가 될 위험 | protected #556 + release/consumer lanes | Source integrated; producer/release/consumer open | protected source + execution/research producer + immutable Noema release + released central consumer corpus RED→GREEN | release/producer evidence를 별도 lane에서 완성 | | P0 | External extension lifecycle evidence | third-party extension의 stale/revoked authority, process-local lifecycle, forged operability 또는 unbound storage/recovery evidence가 runtime truth로 오인될 위험 | protected #574/#577/#578/#579/#580/#581/#582 + issue #561 | Lifecycle/SQLite DO source integrated; production activation adapter + deployed operability/recovery/release evidence open | immutable source + Noema Policy/Approval + immutable foreign-owner refs + append-only lifecycle/CAS/restart + exact deployed p95/contention/storage/recovery + deployment/release provenance | fail-closed `active`를 유지하고 immutable owner-issued refs가 준비된 뒤 production adapter를 연결한 후 actual deployed #561 acceptance를 실행 | -| P0 | Procedural graph advisory activation boundary | deterministic local graph/session/screening 결과나 caller-cached lifecycle snapshot이 signed contract, durable current-state approval 또는 product authority처럼 소비될 위험 | protected #585/#586 + Draft #589 + issue #584 | Core/pure adapter protected; workflow-backed current-state ACL in review; activation intentionally unavailable | protected exact source + released `context-graph-contracts` contract + authenticated paired evaluation receipts + explicit Policy/Approval + durable graph/rejection history/promotion CAS + deployed current-state evidence + canary/rollback + product-owner outcome evidence | #589 exact-head repair/docs/checks를 완료해 정상 통합한 뒤 authenticated evaluation + durable graph/rejection history + Policy/Approval CAS를 별도 owner-approved successor로 진행 | +| P0 | Procedural graph advisory activation boundary | deterministic local graph/session/screening 결과나 caller-cached lifecycle snapshot이 signed contract, durable current-state approval 또는 product authority처럼 소비될 위험 | protected #585/#586/#589 + issue #584 | Core/pure adapter/workflow-backed current-state ACL protected; activation intentionally unavailable | protected exact source + released `context-graph-contracts` contract + authenticated paired evaluation receipts + explicit Policy/Approval + durable graph/rejection history/promotion CAS + deployed current-state evidence + canary/rollback + product-owner outcome evidence | post-merge documentation authority를 수렴한 뒤 authenticated evaluation + durable graph/rejection history + Policy/Approval CAS를 owner-approved successor로 진행 | | P0 | Protected-main governance closure | required Security workflow만으로 PR/review/history/deletion/bypass 통제를 증명했다고 오인할 위험 | issue #27 | Open; external control evidence absent | fresh live ruleset + required PR/review/conversation/history/deletion controls + independent bypass/break-glass evidence + protected-source governance receipt | source가 만들 수 없는 organization/admin control은 issue #27에서 독립 검증 | | P0 | Strict orchestrator/free consumer release | source 통합만으로 immutable consumer activation을 증명할 수 없음 | merged #535 + release lane | Source integrated; release/consumer open | version/tag/package/SBOM/provenance/reproducibility/rollback + released consumer | release-ready protected head에서만 publication | | P0 | Patch-validator operational publication | source/image CI success만으로 reusable immutable runtime을 증명할 수 없음 | issue #66 | Open; publication evidence absent | protected execution + immutable image/signature/SBOM/provenance/reproducibility/rollback | protected-main operational image receipt 뒤 immutable publication/signing/attestation/activation을 별도 증거로 완성 | diff --git a/test/documentation-current-trust-authority.test.ts b/test/documentation-current-trust-authority.test.ts index 1b5f473e4..4d57dc6ef 100644 --- a/test/documentation-current-trust-authority.test.ts +++ b/test/documentation-current-trust-authority.test.ts @@ -35,13 +35,14 @@ describe("current protected trust authority documentation", () => { "Status: Proposed implementation and rollout record, not release or deployment acceptance.", ); expect(adoption).toContain("[lifecycle #586]"); + expect(adoption).toContain("[current-state ACL #589]"); }); it("records merged procedural source separately from rollout acceptance", () => { const adoption = readFileSync("docs/doctoring/procedural_graph_adoption.md", "utf8"); expect(adoption).toContain( - "Protected source integration: #585 and #586 are merged on protected `main`.", + "Protected source integration: #585, #586, and #589 are merged on protected `main`.", ); expect(adoption).not.toContain( "Noema: complete #585 and #586, preserve parent-first ancestry and existing runtime boundaries.", @@ -79,7 +80,7 @@ describe("current protected trust authority documentation", () => { expect(testStrategy).toContain("if the item is waiting, rotate to other safe work"); expect(traceability).toContain("Implemented on protected main as advisory-only/non-durable source"); expect(traceability).not.toContain("The first six steps are Noema Agent Runtime mechanics in the active #585 candidate"); - expect(baseline).toContain("## Protected procedural graph advisory source — issue #584 / merged #585 + #586"); + expect(baseline).toContain("## Protected procedural graph advisory source — issue #584 / merged #585 + #586 + #589"); expect(baseline).not.toContain("## Active procedural graph advisory candidate — issue #584 / PR #585"); expect(baseline).toContain("ADR 0017도 `Proposed`다."); }); diff --git a/test/procedural-protected-documentation-contract.test.ts b/test/procedural-protected-documentation-contract.test.ts new file mode 100644 index 000000000..518ace86e --- /dev/null +++ b/test/procedural-protected-documentation-contract.test.ts @@ -0,0 +1,27 @@ +import { readFileSync } from "node:fs"; +import { describe, expect, it } from "vitest"; + +const document = (path: string): string => readFileSync(path, "utf8"); + +describe("protected procedural documentation authority", () => { + it("classifies the merged workflow-backed current-state ACL as protected source", () => { + const architecture = document("ARCHITECTURE.md"); + const prd = document("docs/PRD.md"); + const trd = document("docs/TRD.md"); + const baseline = document("docs/product-technical-gap-baseline.md"); + const adoption = document("docs/doctoring/procedural_graph_adoption.md"); + + for (const currentDocument of [architecture, prd, trd, baseline, adoption]) { + expect(currentDocument).not.toContain("On this active branch"); + expect(currentDocument).not.toContain("Draft #589"); + expect(currentDocument).not.toContain("candidate #589"); + expect(currentDocument).not.toContain("tracked in #589 until its own protected integration"); + } + + expect(architecture).toContain("Protected source `src/agent-runtime/procedural-current-lifecycle.ts`"); + expect(prd).toContain("Protected source includes the #589 workflow-backed current-state ACL"); + expect(trd).toContain("Protected source reuses the Workflow / Task Execution Durable Object only as current task/cancellation evidence for procedural guidance"); + expect(baseline).toContain("protected #585/#586/#589"); + expect(adoption).toContain("#585, #586, and #589 are merged on protected `main`"); + }); +});