Skip to content

Commit 1bf6d72

Browse files
committed
merge: resolve conflicts keeping all content from both sides
2 parents 00b300b + 9350398 commit 1bf6d72

9 files changed

Lines changed: 241 additions & 10 deletions

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ validate-activation:
7575
$(PYTHON) scripts/validate-activation.py
7676
$(PYTHON) scripts/evaluate-activation.py $(LOCAL_AGENTPOD) $(READY_POLICY) $(READY_GRANT) --deployment-receipt-id $(DEPLOYMENT_RECEIPT_ID) --storage-receipt-dir examples --decided-at $(DECIDED_AT) --decision-id urn:srcos:agent-machine:activation-decision:local-llama-cpp-allowed --pretty >/tmp/agent-machine-evaluate-activation-allowed.json
7777
$(PYCLI) activate evaluate $(LOCAL_AGENTPOD) $(FAIL_POLICY) $(FAIL_GRANT) --deployment-receipt-id $(DEPLOYMENT_RECEIPT_ID) --storage-receipt-dir $(RECEIPT_DIR) --decided-at $(DECIDED_AT) --decision-id urn:srcos:agent-machine:activation-decision:local-llama-cpp-fail-closed --pretty >/tmp/agent-machine-pycli-evaluate-activation-fail-closed.json
78+
$(BOOTSTRAP_CLI) activate evaluate $(LOCAL_AGENTPOD) $(READY_POLICY) $(READY_GRANT) --deployment-receipt-id $(DEPLOYMENT_RECEIPT_ID) --storage-receipt-dir $(RECEIPT_DIR) --decided-at $(DECIDED_AT) --decision-id urn:srcos:agent-machine:activation-decision:local-llama-cpp-allowed --pretty >/tmp/agent-machine-bootstrap-evaluate-activation-allowed.json
7879
$(PYCLI) activate evaluate $(LOCAL_AGENTPOD) $(READY_GRANT) --policy-dir $(POLICY_DIR) --expected-status allowed --deployment-receipt-id $(DEPLOYMENT_RECEIPT_ID) --agent-machine-id urn:srcos:agent-machine:m2-asahi-local --provider-id urn:srcos:agent-machine:inference-provider:asahi-llama-cpp --storage-receipt-dir $(RECEIPT_DIR) --decided-at $(DECIDED_AT) --decision-id urn:srcos:agent-machine:activation-decision:local-llama-cpp-allowed --pretty >/tmp/agent-machine-pycli-resolved-policy-activation-allowed.json
7980
$(PYCLI) activate evaluate $(LOCAL_AGENTPOD) --policy-dir $(POLICY_DIR) --expected-status allowed --grant-dir $(GRANT_DIR) --grant-id urn:srcos:agent-machine:agent-registry-grant:active-loopback-activation --session-ref urn:srcos:session:local-bootstrap --deployment-receipt-id $(DEPLOYMENT_RECEIPT_ID) --agent-machine-id urn:srcos:agent-machine:m2-asahi-local --provider-id urn:srcos:agent-machine:inference-provider:asahi-llama-cpp --storage-receipt-dir $(RECEIPT_DIR) --decided-at $(DECIDED_AT) --decision-id urn:srcos:agent-machine:activation-decision:local-llama-cpp-allowed --pretty >/tmp/agent-machine-pycli-resolved-policy-grant-activation-allowed.json
8081
$(BOOTSTRAP_CLI) activate evaluate $(LOCAL_AGENTPOD) $(READY_POLICY) $(READY_GRANT) --deployment-receipt-id $(DEPLOYMENT_RECEIPT_ID) --storage-receipt-dir $(RECEIPT_DIR) --decided-at $(DECIDED_AT) --decision-id urn:srcos:agent-machine:activation-decision:local-llama-cpp-allowed --pretty >/tmp/agent-machine-bootstrap-evaluate-activation-allowed.json
@@ -105,6 +106,7 @@ validate-cli:
105106
$(PYCLI) steer preflight --sourceset gpt2-small.res-jb --pretty >/tmp/agent-machine-pycli-steer-preflight.json
106107
$(BOOTSTRAP_CLI) steer preflight --sourceset gpt2-small.res-jb --pretty >/tmp/agent-machine-bootstrap-steer-preflight.json
107108
$(PYCLI) steer resolve-artifacts --sourceset gpt2-small.res-jb --local-dir /tmp/agent-machine-steering-artifacts --receipt-out /tmp/agent-machine-steering-artifact-receipt.json --dry-run --pretty >/tmp/agent-machine-pycli-artifact-receipt.json
109+
$(PYTHON) scripts/verify-steering-receipt.py examples/steering-artifact-receipts/gpt2-small-res-jb.missing.steering-artifact-receipt.json --expect-status not_configured --pretty >/tmp/agent-machine-steering-load-preflight.json
108110
$(PYTHON) scripts/verify-steering-receipt.py examples/steering-artifact-receipts/gpt2-small-res-jb.missing.steering-artifact-receipt.json --expect-status not_configured --pretty >/tmp/agent-machine-steering-verify-preflight.json
109111
$(PYTHON) scripts/load-steering-receipt.py examples/steering-artifact-receipts/synthetic.available.steering-artifact-receipt.json --attempt-load --pretty >/tmp/agent-machine-steering-synthetic-load.json
110112
$(PYTHON) scripts/run-mock-steering.py /tmp/agent-machine-steer-request.json --pretty >/tmp/agent-machine-mock-steering.json
@@ -123,4 +125,5 @@ doctor:
123125
$(BOOTSTRAP_CLI) doctor --format json
124126

125127
probe:
126-
$(BOOTSTRAP_CLI) probe --format json
128+
$(BOOTSTRAP_CLI) probe --format json
129+
$(BOOTSTRAP_CLI) probe --format json

contracts/external-trust-signal-provider.schema.json

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
"description": "Secret-free adapter request/response contract for optional non-authoritative external identity, reputation, certificate-tier, counterparty, and registry lookup signals used as Agent Registry verifier inputs.",
66
"type": "object",
77
"additionalProperties": false,
8+
"required": ["specVersion", "id", "kind", "request", "response", "receiptSafety", "observedAt"],
9+
"$defs": {
10+
"signalType": {
11+
"type": "string",
12+
"enum": ["agent-identity", "cert-tier", "reputation-score", "counterparty-check", "registry-lookup", "other"]
13+
},
14+
"sha256Digest": {
15+
"type": ["string", "null"],
816
"required": [
917
"specVersion",
1018
"id",
@@ -36,6 +44,11 @@
3644
"freshness": {
3745
"type": "object",
3846
"additionalProperties": false,
47+
"required": ["maxAgeSeconds", "observedAgeSeconds", "fresh"],
48+
"properties": {
49+
"maxAgeSeconds": { "type": "integer", "minimum": 0 },
50+
"observedAgeSeconds": { "type": "integer", "minimum": 0 },
51+
"fresh": { "type": "boolean" }
3952
"required": [
4053
"maxAgeSeconds",
4154
"observedAgeSeconds",
@@ -58,6 +71,12 @@
5871
"signature": {
5972
"type": "object",
6073
"additionalProperties": false,
74+
"required": ["required", "observed", "signatureRef", "signerRef"],
75+
"properties": {
76+
"required": { "type": "boolean" },
77+
"observed": { "type": "boolean" },
78+
"signatureRef": { "type": ["string", "null"] },
79+
"signerRef": { "type": ["string", "null"] }
6180
"required": [
6281
"required",
6382
"observed",
@@ -88,6 +107,18 @@
88107
"externalTrustSignal": {
89108
"type": "object",
90109
"additionalProperties": false,
110+
"required": ["providerRef", "signalType", "signalRef", "signalDigest", "verifiedAt", "freshness", "signature", "authority", "failureReason"],
111+
"properties": {
112+
"providerRef": { "type": "string" },
113+
"signalType": { "$ref": "#/$defs/signalType" },
114+
"signalRef": { "type": "string" },
115+
"signalDigest": { "$ref": "#/$defs/sha256Digest" },
116+
"verifiedAt": { "type": "string" },
117+
"freshness": { "$ref": "#/$defs/freshness" },
118+
"signature": { "$ref": "#/$defs/signature" },
119+
"authority": { "type": "string", "const": "non-authoritative-verifier-input" },
120+
"failureReason": { "type": ["string", "null"] },
121+
"notes": { "type": "array", "items": { "type": "string" } }
91122
"required": [
92123
"providerRef",
93124
"signalType",
@@ -141,6 +172,7 @@
141172
}
142173
},
143174
"properties": {
175+
"specVersion": { "type": "string", "const": "0.1.0" },
144176
"specVersion": {
145177
"type": "string",
146178
"const": "0.1.0"
@@ -149,6 +181,14 @@
149181
"type": "string",
150182
"pattern": "^urn:srcos:agent-machine:external-trust-signal-provider:[a-z0-9][a-z0-9-]*$"
151183
},
184+
"kind": { "type": "string", "const": "ExternalTrustSignalProvider" },
185+
"request": {
186+
"type": "object",
187+
"additionalProperties": false,
188+
"required": ["requestId", "providerRef", "agentPodId", "requestedAgentIdentityRef", "sessionRef", "workroomRef", "topicRef", "requestedSignalTypes", "verificationFreshnessSeconds", "requestedExpiresAt", "signatureRequired"],
189+
"properties": {
190+
"requestId": { "type": "string" },
191+
"providerRef": { "type": "string" },
152192
"kind": {
153193
"type": "string",
154194
"const": "ExternalTrustSignalProvider"
@@ -180,6 +220,19 @@
180220
"type": "string",
181221
"pattern": "^urn:srcos:agent-machine:agent-pod:[a-z0-9][a-z0-9-]*$"
182222
},
223+
"requestedAgentIdentityRef": { "type": "string" },
224+
"sessionRef": { "type": "string" },
225+
"workroomRef": { "type": ["string", "null"] },
226+
"topicRef": { "type": ["string", "null"] },
227+
"requestedSignalTypes": {
228+
"type": "array",
229+
"items": { "$ref": "#/$defs/signalType" },
230+
"minItems": 1,
231+
"uniqueItems": true
232+
},
233+
"verificationFreshnessSeconds": { "type": "integer", "minimum": 0 },
234+
"requestedExpiresAt": { "type": ["string", "null"] },
235+
"signatureRequired": { "type": "boolean" }
183236
"requestedAgentIdentityRef": {
184237
"type": "string"
185238
},
@@ -224,6 +277,22 @@
224277
"response": {
225278
"type": "object",
226279
"additionalProperties": false,
280+
"required": ["status", "usableForGrantResolution", "providerRef", "authority", "verifiedAt", "freshness", "signals", "failureReason"],
281+
"properties": {
282+
"status": {
283+
"type": "string",
284+
"enum": ["available", "unavailable", "stale", "malformed", "unsigned", "denied", "error"]
285+
},
286+
"usableForGrantResolution": { "type": "boolean" },
287+
"providerRef": { "type": "string" },
288+
"authority": { "type": "string", "const": "non-authoritative-verifier-input" },
289+
"verifiedAt": { "type": ["string", "null"] },
290+
"freshness": { "$ref": "#/$defs/freshness" },
291+
"signals": {
292+
"type": "array",
293+
"items": { "$ref": "#/$defs/externalTrustSignal" }
294+
},
295+
"failureReason": { "type": ["string", "null"] }
227296
"required": [
228297
"status",
229298
"usableForGrantResolution",
@@ -283,6 +352,21 @@
283352
"receiptSafety": {
284353
"type": "object",
285354
"additionalProperties": false,
355+
"required": ["includeRawContent", "rawPromptContentIncluded", "rawKvCacheContentIncluded", "secretValuesIncluded", "privateMemoryIncluded", "apiKeysIncluded", "walletPrivateKeysIncluded", "rawCredentialsIncluded", "rawUserDataIncluded"],
356+
"properties": {
357+
"includeRawContent": { "type": "boolean", "const": false },
358+
"rawPromptContentIncluded": { "type": "boolean", "const": false },
359+
"rawKvCacheContentIncluded": { "type": "boolean", "const": false },
360+
"secretValuesIncluded": { "type": "boolean", "const": false },
361+
"privateMemoryIncluded": { "type": "boolean", "const": false },
362+
"apiKeysIncluded": { "type": "boolean", "const": false },
363+
"walletPrivateKeysIncluded": { "type": "boolean", "const": false },
364+
"rawCredentialsIncluded": { "type": "boolean", "const": false },
365+
"rawUserDataIncluded": { "type": "boolean", "const": false }
366+
}
367+
},
368+
"observedAt": { "type": "string" },
369+
"labels": { "type": "object", "additionalProperties": { "type": "string" } }
286370
"required": [
287371
"includeRawContent",
288372
"rawPromptContentIncluded",

docs/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Agent Machine is a bootstrap runtime-control substrate for SourceOS agent worklo
3232
| [AgentRegistryGrant resolution](architecture/agent-registry-grant-resolution.md) | Local Agent Registry grant resolver and fail-closed missing-grant behavior. |
3333
| [Image digest pinning and provenance](architecture/image-digest-pinning-and-provenance.md) | Supply-chain strict-mode gate for digest-pinned release-candidate artifacts. |
3434
| [Release evidence bundle](architecture/release-evidence-bundle.md) | Deterministic validation/source/inventory/render/supply-chain/readiness bundle. |
35+
| [Signed release bundle envelope](architecture/signed-release-bundle-envelope.md) | Signing envelope contract for release evidence bundles. |
3536
| [Signed release bundle envelope](architecture/signed-release-bundle-envelope.md) | Signing/verification envelope around a release evidence bundle. |
3637
| [Runtime package layout](architecture/runtime-package-layout.md) | Migration from loose scripts to `src/agent_machine/` package modules. |
3738
| [Homebrew Python dependencies](architecture/homebrew-python-dependencies.md) | Current dependency strategy for render/evaluation commands. |
@@ -133,4 +134,5 @@ Current blockers:
133134
- TopoLVM runtime integration beyond skeleton manifests;
134135
- provider discovery and controlled provider activation implementation;
135136
- M2 Asahi host measurement/provider readiness data;
136-
- rollback, teardown, and wipe workflows.
137+
- rollback, teardown, and wipe workflows.
138+
- rollback, teardown, and wipe workflows.

docs/inference-local-steering.md

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
# Local SAE Steering Inference Readiness
22

3+
Status: inspection record for Issue #31. This document records current repository evidence for a Neuronpedia-compatible local steering path. It does not implement an inference server and does not claim runtime readiness.
34
Status: inspection and registration record. This document records current repository evidence for a Neuronpedia-compatible local steering path. It does not implement an inference server and does not claim runtime readiness.
45

56
## Summary verdict
67

78
Agent Machine is not currently ready to run local SAE steering for `MODEL_SOURCESET=gpt2-small.res-jb`.
89

10+
The repository has a backend-neutral `InferenceProvider` contract and a probe-only `llama.cpp` provider example, but no current repository artifact registers:
11+
12+
- `MODEL_SOURCESET=gpt2-small.res-jb`
13+
- GPT-2 Small SAE artifacts
14+
- Gemma 2B or Gemma 9B steering sourcesets
15+
- a Neuronpedia-compatible `POST /steer` endpoint
16+
- an activation command that starts a steering inference server
17+
18+
This is consistent with the repository status: provider activation is explicitly not implemented, and production readiness remains blocked by provider discovery and controlled provider activation.
19+
20+
## Repository evidence inspected
21+
22+
Inspected on 2026-05-20 against `main` at commit `c306852f26f4fbe62421a9b7801a59815d4daf9e`.
923
The repository now has:
1024

1125
- a backend-neutral `InferenceProvider` contract
@@ -32,6 +46,9 @@ Relevant repository evidence:
3246
- `README.md` describes Agent Machine as a bootstrap runtime-control substrate and marks provider activation as not implemented.
3347
- `BOOTSTRAP_STATUS.md` states activation remains dry-run control-plane evaluation and does not start a provider.
3448
- `docs/index.md` lists `InferenceProvider` as a contract family but keeps production blocked by provider discovery and controlled activation.
49+
- `contracts/inference-provider.schema.json` defines backend-neutral provider metadata and API surfaces such as OpenAI-compatible chat/completions/embeddings and native HTTP. It does not define a Neuronpedia-compatible `/steer` API surface.
50+
- `examples/asahi-llama-cpp.inference-provider.json` is `status: probe-only`, uses `llama.cpp`, and exposes an endpoint/health path for `llama-server`; it is not a steering server.
51+
- Repository search found no current references to `MODEL_SOURCESET`, `gpt2-small`, `res-jb`, `Gemma`, or `/steer` as implemented local steering surfaces.
3552
- `contracts/inference-provider.schema.json` defines backend-neutral provider metadata and API surfaces such as OpenAI-compatible chat/completions/embeddings and native HTTP.
3653
- `examples/asahi-llama-cpp.inference-provider.json` is `status: probe-only`, uses `llama.cpp`, and exposes an endpoint/health path for `llama-server`; it is not a steering server.
3754
- `docs/local-steer-endpoint.md` defines the local `/steer` contract and stub behavior.
@@ -42,6 +59,9 @@ Relevant repository evidence:
4259

4360
| Sourceset | Current repo status | Ready today? | Reason |
4461
| --- | --- | --- | --- |
62+
| `gpt2-small.res-jb` | Not registered | No | No sourceset manifest, no GPT-2 Small SAE artifact reference, no `/steer` endpoint, and no activation path. |
63+
| Gemma 2B | Not registered | No | No Gemma sourceset manifest, no SAE artifact reference, no `/steer` endpoint, and no activation path. |
64+
| Gemma 9B | Not registered | No | No Gemma sourceset manifest, no SAE artifact reference, no `/steer` endpoint, and no activation path. |
4565
| `gpt2-small.res-jb` | Registered by reference | No | Sourceset record exists, but artifact digests, storage receipts, policy/grant admission, activation injection, and smoke proof are missing. |
4666
| `gemma-2-2b.pt-res` | Registered by reference, access-sensitive | No | Sourceset record exists, but model terms/access, artifact digests, storage receipts, policy/grant admission, activation injection, and smoke proof are missing. |
4767
| Gemma 9B | Not registered | No | Not admitted in Issue #33; register only after hardware/runtime profile and access posture are settled. |
@@ -55,6 +75,17 @@ Model weights:
5575
- Hugging Face model: `openai-community/gpt2`
5676
- Public model page: `https://huggingface.co/openai-community/gpt2`
5777
- Observed license on model page: MIT
78+
- Access posture observed from the public page: no account-gating was evident during inspection
79+
80+
Still required before readiness:
81+
82+
- explicit Agent Machine sourceset record for `gpt2-small.res-jb`
83+
- exact GPT-2 Small model artifact reference and digest policy
84+
- exact SAE artifact source and digest policy
85+
- runtime storage/cache placement receipts
86+
- activation policy and agent-registry grant examples for the steering provider
87+
88+
### Gemma 2B / Gemma 9B
5889

5990
SAE artifacts:
6091

@@ -78,6 +109,22 @@ Model weights:
78109

79110
- Hugging Face model: `google/gemma-2-2b`
80111
- Public model page: `https://huggingface.co/google/gemma-2-2b`
112+
- Hugging Face model: `google/gemma-2-9b`
113+
- Public model page: `https://huggingface.co/google/gemma-2-9b`
114+
- Observed license on model pages: Gemma license
115+
116+
Access posture:
117+
118+
- Treat Gemma access as terms-sensitive until an operator verifies availability under the relevant Hugging Face account and accepts any required Google terms.
119+
- Do not claim Gemma readiness from public model-card existence alone.
120+
121+
Still required before readiness:
122+
123+
- explicit Agent Machine sourceset record for each Gemma target admitted to scope
124+
- exact model artifact references and digest policies
125+
- exact SAE artifact sources and digest policies
126+
- hardware/runtime profile decision for Gemma model size
127+
- activation policy and grant examples
81128
- License/access: Gemma terms; operator must verify account access and accept applicable terms before runtime use.
82129

83130
SAE artifacts:
@@ -138,6 +185,7 @@ Allowed status values must align with Noetica steering semantics:
138185
- `not_configured`: required model/source/SAE/backend configuration is absent.
139186
- `noop`: the endpoint accepted the request shape but deliberately applied no runtime intervention.
140187

188+
This endpoint shape is a target contract. It is not implemented in Agent Machine at the time of this inspection.
141189
Issue #32 provides a stub endpoint that can return `not_configured` or `noop`. `applied` remains blocked on Issue #34.
142190

143191
## Current Agent Machine commands
@@ -157,13 +205,29 @@ Local endpoint contract stub from Issue #32:
157205
```bash
158206
agent-machine steer serve-stub --host 127.0.0.1 --port 8080 --status not_configured
159207
```
160-
161208
Current validation command:
162209

163210
```bash
164211
make validate
165212
```
166213

214+
No current Agent Machine command was found that starts a Neuronpedia-compatible local `/steer` server.
215+
216+
## Follow-up issues opened
217+
218+
- Issue #32: define the Neuronpedia-compatible local `/steer` endpoint contract.
219+
- Issue #33: register local steering sourcesets for GPT-2 Small and Gemma.
220+
- Issue #34: implement controlled activation for a local steering inference provider after endpoint and sourceset records exist.
221+
222+
## Readiness conclusion
223+
224+
Current status: not ready.
225+
226+
`MODEL_SOURCESET=gpt2-small.res-jb` is not loadable today from the repository state. The self-hosted M2b path requires at least:
227+
228+
1. local `/steer` contract definition
229+
2. sourceset registration
230+
3. model and SAE artifact references with digest policy
167231
## Follow-up issues
168232

169233
- Issue #32: local `/steer` endpoint contract — closed.
@@ -183,4 +247,5 @@ Current status: registered but not loadable.
183247
5. evidence and grant wiring
184248
6. successful local smoke record
185249

250+
Until those are complete, Noetica should use `NEURONPEDIA_BASE_URL=http://localhost:<port>` only as a configurable endpoint target for future experiments, not as proof that Agent Machine can already perform local SAE steering.
186251
Until those are complete, Noetica should use `NEURONPEDIA_BASE_URL=http://localhost:<port>` only as a configurable endpoint target for contract and UI testing, not as proof that Agent Machine can already perform local SAE steering.

0 commit comments

Comments
 (0)