merge: sync cognitive remediation with integration

This commit is contained in:
m
2026-09-01 03:06:51 +03:00
58 changed files with 2922 additions and 36 deletions
+4
View File
@@ -23,6 +23,10 @@ Each privileged runtime gets only its required secret/capability bindings. `comm
The Core SELF learning repository uses the existing `assistant_core_secrets` volume and credential-reference mechanism with `self_role` and `credential://domovoy/self/db-password/v1`. The secret is consumed from the fixed `/run/secrets/self_db_password` path; its value is never placed in Compose environment, Git, logs or ordinary configuration. The role and schema already exist; this wiring does not create a role or broaden privileges.
Delegated non-interactive control-plane work is separately authenticated. The local `secret-control-plane` one-shot control-plane service provisions `control_plane_service_token` with `crypto/rand` into the dedicated external `assistant_control_plane_service_secrets` volume. The token artifact is mode `0400`; metadata and audit are separate protected files and contain no value or reversible fingerprint. Only `core-runtime` and the existing Authority/Commit runtime mount that volume read-only at `/run/control-plane-secrets`; no model, Skill, SELF, creator-web, cognitive-worker or research-runtime receives the mount. Compose carries only the non-secret credential reference `credential://domovoy/control-plane/service-token/v1`.
The provisioner is idempotent: restart reuses an existing safe active artifact. Rotation creates a new value by atomic replacement, records non-secret metadata/audit, and never accepts a plaintext environment variable. The service token is not a Creator session, cannot impersonate a human, and never grants Authority by itself. Removing or rotating the token disables/refreshes service authentication; revoking the durable Authority grant also blocks new delegated operations without deleting audit history.
Creator authentication secrets are stored in the external Docker volume `assistant_core_secrets` and mounted read-only only at `/run/secrets` in `core-runtime`. The production container environment contains `_FILE` paths, not the secret values. Files are owned by runtime uid 100/gid 101 with mode 0400. `CREATOR_USERNAME` is not secret and remains an environment value. Development may continue to use direct environment values, but a direct value and its matching `_FILE` setting must never be configured together.
The PostgreSQL off-host backup passphrase is generated randomly and stored as CurrentUser DPAPI ciphertext at `%LOCALAPPDATA%\Domovoy\postgres-backup-key.dpapi.json`. An atomic copy of that DPAPI ciphertext, never the plaintext passphrase, is retained at `\\nas\MST\codex\_backups\domovoy\keys\postgres-backup-key.dpapi.json`. The passphrase is never stored in Git, the production Docker host, a scheduled-task argument, or NAS plaintext. The NAS backup directory receives only GnuPG AES-256 ciphertext and a non-secret integrity manifest. Recovery therefore requires both the NAS artifacts and the authorized Windows DPAPI profile.
@@ -0,0 +1,50 @@
# GEN2-AUTHORITY-001 — delegated control-plane deployment evidence
Date: 2026-08-31
The former missing-credential prerequisite is resolved by
`GEN2-SECRETS-001`. A local one-shot provisioner created the dedicated
protected artifact and verified idempotent ensure/rotation without reading or
emitting its value. Core and Commit are wired to resolve it from the dedicated
read-only mount, not the shared secret volume.
## Implemented and verified locally
The bounded implementation is present on branch
`gen2/authority-001-delegated-control-plane`. It keeps Identity as the service
identity owner, Authority as the durable grant/revocation/audit owner, and
Capability as the cognitive lifecycle owner. Core is an Authority-runtime
client; the Authority endpoint is served by the existing Commit runtime that
already owns the Authority repository in the V2 runtime topology.
On 2026-08-31 the following checks completed successfully without secret
values:
- targeted `go test` for Authority contracts/domain, secret resolver, Core,
Commit runtime, and the Authority PostgreSQL adapter;
- targeted `go vet` for the same packages;
- production and candidate Compose static validation;
- task preflight, diff scope, independent governance, and architecture checks;
- `git diff --check`.
## Current deployment-control gap
No delegated lifecycle operation has been attempted in production.
On 2026-08-31 the stable Core and Commit runtimes both reported release
revision `2ee5da81145cdad2da1c92c24a91145ad4af61a5`. The existing candidate
slot script declares exactly four components: Creator Web, Core, Cognitive
Worker, and Research Runtime. It has no candidate Commit runtime.
The Authority endpoint is intentionally served by Commit runtime. Therefore a
candidate Core cannot perform a real delegated Authority request against the
required matching candidate Commit runtime without either recreating stable
Commit (forbidden) or extending the candidate ReleaseSet/Supervisor contract
to contain Commit as an independently healthy and rollback-aware component.
This is `BLOCKED_BY_SPEC_GAP`, not a credential or implementation failure. A
new explicit packet/revision must authorize the minimum deployment paths:
`deploy/docker-compose.candidate-slot.yml`, `deploy/run-production-canary.sh`,
and the Supervisor release-set contract/tests if its fixed four-component
schema must change. The change must define Commit candidate health, revision
consistency, traffic/promotion behavior, and whole-ReleaseSet rollback.
@@ -0,0 +1,22 @@
# GEN2-CAPABILITY-001 notification receiver classification
## Evidence
The notification target is implemented by this repository's
`cmd/notification-receiver` runtime. It exposes the bounded delivery and
receipt protocol used by `adapters/notificationexecutor`; it is therefore an
Assistant ReleaseComponent, not a shared external service.
The current stable receiver persists idempotent receipts and is configured
with separate read/write secrets. Candidate acceptance must not reuse its
runtime instance, secret mount, or stable Capability ACTIVE binding.
## Candidate decision
The candidate ReleaseSet requires its own `notification-receiver-candidate`
instance in explicit shadow mode. That instance accepts only synthetic,
task-scoped delivery traffic and returns a shadow receipt. It has no
production delivery credential or production destination route.
`SHADOW_CAPTURED` proves only receipt capture. It is not delivery, a sent
notification, or a verified World outcome.
@@ -0,0 +1,60 @@
# GEN2-DEPLOY-004 r2 — candidate dependency-closure finding
## Decision and graph evidence
The owner-approved r2 rule requires every versioned Assistant runtime reached
by normal candidate operation to be in the candidate ReleaseSet. Static
runtime configuration establishes this candidate closure:
```text
creator-web -> core-runtime, continuity-runtime, commit-runtime,
cognitive-worker, agent-worker
core-runtime -> cognitive-worker, research-runtime, continuity-runtime,
commit-runtime
commit-runtime -> core-runtime, continuity-runtime
continuity-runtime -> core-runtime, commit-runtime
agent-worker -> task-verifier, agent-execution-bridge
agent-execution-bridge -> cognitive-worker, work-graph-runtime, task-verifier
work-graph-runtime -> core-runtime
```
Therefore the static closure is: Creator Web, Core Runtime, Cognitive Worker,
Research Runtime, Commit Runtime, Continuity Runtime, Agent Worker, Agent
Execution Bridge, Work Graph Runtime, and Task Verifier.
PostgreSQL, protected secret volumes, the local model gateway/lifeboat, and
the configured web-search endpoint are classified as shared durable
infrastructure or shared external services. They do not contain an Assistant
semantic/runtime release revision.
## Blocking dynamic dependency
Commit's normal prospective-notification operation obtains the exact active
notification Capability binding from Core. The binding's immutable
`HTTPSOrigin`, delivery path, and revision select the receiver. This is not a
Compose environment URL and cannot be safely redirected by a container alias.
Consequently, with the existing active binding, a candidate Commit executing a
normal notification operation would call the stable notification receiver. A
candidate notification-receiver container alone does not solve the problem:
the candidate would still resolve the stable binding. Reusing the stable name
would create ambiguous network routing, and changing the active binding would
mutate Capability-owned canonical state.
No runtime, Capability state, migration, secret, or production container was
changed while establishing this finding.
## Required owner decision
Choose one governed boundary before DEPLOY-004 implementation can prove full
dependency isolation:
1. authorize a bounded Capability-owned candidate binding/shadow-binding
lifecycle, including its authority, rollback and selection semantics; or
2. explicitly classify the notification receiver as a shared external service
for this ReleaseSet, despite it being an Assistant-managed runtime.
The first option requires a new packet revision with the exact Capability
contract/owner paths. The second changes the release-boundary policy and must
be accepted explicitly. No direct binding update, stable alias reuse, or
candidate-to-stable shortcut is an acceptable substitute.
@@ -0,0 +1,53 @@
# GEN2-SECRETS-001 — local machine credential provisioning
Date: 2026-08-31
## Design evidence
`platform/secrets` is the existing technical protected-file mechanism. This
task extends it without adding a semantic Secrets owner, a database table, or
a Configuration/Memory writer.
The dedicated Docker volume is named
`assistant_control_plane_service_secrets`. Its sole writer is the one-shot
`secret-control-plane` control-plane container. Its only consumers are
`core-runtime` and `commit-runtime`, mounted read-only at
`/run/control-plane-secrets`. The metadata directory is distinct from the
token artifact and records purpose, owner, version, consumers, status,
generation method, and non-secret audit actions only.
The provisioner uses `crypto/rand`, writes via an atomic file replacement,
and has no plaintext environment input. It reports only safe operation status.
The data policy marks the artifact as not indexable, embeddable, retrievable,
or model-visible.
## Local FAST evidence
The following checks completed successfully before production execution:
- targeted `go test ./platform/secrets ./cmd/secret-control-plane`;
- targeted `go vet ./platform/secrets ./cmd/secret-control-plane`;
- POSIX shell regression for the provisioning wrapper, executed under Git
Bash because the Windows WSL shim cannot translate the mapped workspace;
- static Docker Compose validation for production and candidate files.
No credential value, fingerprint, length, header, or plaintext environment
value was read, printed, copied, committed, or included in this evidence.
## Production control-plane evidence
The one-shot provisioner was run from a detached `gen2-integration` worktree
on `docker.cin.su`. It created the dedicated external volume and provisioned
the credential once. A repeat `ensure` reported that the already active
artifact was reused. A bounded owner-requested rotation then completed.
For creation, idempotent ensure, and rotation, the stable Core, Commit,
Creator Web, Cognitive Worker, and Research Runtime container identities were
recorded before and after the one-shot operation and were unchanged. The
verification checked only artifact and separate metadata/audit file presence;
it did not read their content.
At this point the credential is provisioned but not yet used by the stable
runtime. Consumer mount and service-authentication acceptance are completed
only when `GEN2-AUTHORITY-001` is merged and deployed as its own controlled
candidate ReleaseSet.