Skip to content

Commit 5869117

Browse files
neo-gpttobiu
andauthored
feat(ai): pin cloud-profile wake boundaries (#11725) (#11758)
Co-authored-by: tobiu <tobiasuhlig78@gmail.com>
1 parent 350aa33 commit 5869117

3 files changed

Lines changed: 34 additions & 4 deletions

File tree

ai/deploy/docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ services:
7979
environment:
8080
- NEO_TRANSPORT=sse
8181
- NEO_MC_PRIMARY=false
82+
- NEO_MAILBOX_DEFAULT_REPLY_POLICY=blocked
8283
- NEO_AUTO_SUMMARIZE=false
8384
- NEO_MEM_AUTO_START_DATABASE=false
8485
- NEO_MEM_AUTO_START_INFERENCE=false
@@ -125,6 +126,11 @@ services:
125126
SERVICE_ENTRYPOINT: ai/scripts/orchestrator-daemon.mjs
126127
environment:
127128
- NEO_AI_DEPLOYMENT_MODE=cloud
129+
- NEO_ORCHESTRATOR_PRIMARY_DEV_SYNC_ENABLED=false
130+
- NEO_ORCHESTRATOR_KB_SYNC_ENABLED=false
131+
- NEO_ORCHESTRATOR_BRIDGE_DAEMON_ENABLED=false
132+
- NEO_ORCHESTRATOR_GOLDEN_PATH_REPO_ENRICHMENT_ENABLED=false
133+
- NEO_ORCHESTRATOR_MLX_ENABLED=false
128134
- NEO_CHROMA_HOST=chroma
129135
- NEO_CHROMA_PORT=8000
130136
- NEO_MEMORY_DB_PATH=/app/.neo-ai-data/sqlite/memory-core-graph.sqlite

learn/agentos/DeploymentCookbook.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ lane back in. The explicit env overrides are:
5454
| `NEO_ORCHESTRATOR_BRIDGE_DAEMON_ENABLED=false` | Prevents desktop wake delivery through `osascript` / `tmux`. A2A message storage remains Memory Core behavior. |
5555
| `NEO_ORCHESTRATOR_GOLDEN_PATH_REPO_ENRICHMENT_ENABLED=false` | Keeps tenant deployments from emitting Neo-maintainer repo backlog/PR enrichment sections. |
5656
| `NEO_ORCHESTRATOR_MLX_ENABLED=false` | Keeps Apple-Silicon local inference out of the cloud profile unless a local-model variant explicitly opts in. |
57+
| `NEO_MAILBOX_DEFAULT_REPLY_POLICY=blocked` | Keeps cloud A2A message writes tenant-bound through the Memory Core `CAN_REPLY_TO` / reachable-counterparty policy; local wake delivery remains disabled by the orchestrator bridge toggle. |
5758

5859
Sub D (#11725) owns the CI-safe negative proof that the cloud profile cannot run
5960
the forbidden local-only behavior. The current unit substrate already asserts
@@ -147,6 +148,7 @@ Supply these values per service/profile as needed:
147148
| `NEO_MEMORY_DB_PATH` | KB, MC, Orchestrator | Shared SQLite graph path or mounted graph-store path. |
148149
| `NEO_AUTH_TRUST_PROXY_IDENTITY=true` | KB, MC | Enables the trusted reverse-proxy identity-header path. |
149150
| `NEO_AUTH_ISSUER_URL`, `NEO_OAUTH_CLIENT_ID`, `NEO_OAUTH_CLIENT_SECRET` | KB, MC | Direct OIDC/OAuth mode inputs when the MCP server handles auth instead of a trusted proxy. |
151+
| `NEO_MAILBOX_DEFAULT_REPLY_POLICY=blocked` | MC | Enables the strict A2A reply policy for multi-tenant deployments. |
150152
| `NEO_AI_DEPLOYMENT_MODE=cloud` | Orchestrator | Selects the cloud maintenance profile. |
151153
| `NEO_ORCHESTRATOR_PRIMARY_DEV_SYNC_ENABLED=false` | Orchestrator | Disables local maintainer checkout sync. |
152154
| `NEO_ORCHESTRATOR_KB_SYNC_ENABLED=false` | Orchestrator | Disables local full-corpus KB sync. |

test/playwright/unit/ai/buildScripts/mcpHealthcheck.spec.mjs

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ test.describe('buildScripts/ai/mcpHealthcheck (#11725)', () => {
77
let buildHeaders;
88
let readToolJson;
99
let runHealthcheck;
10+
const readProductionCompose = () => yaml.load(fs.readFileSync(
11+
new URL('../../../../../ai/deploy/docker-compose.yml', import.meta.url),
12+
'utf8'
13+
));
14+
15+
function environmentMap(service) {
16+
return Object.fromEntries(service.environment.map(entry => entry.split('=')));
17+
}
1018

1119
test.beforeAll(async () => {
1220
const mod = await import('../../../../../buildScripts/ai/mcpHealthcheck.mjs');
@@ -144,10 +152,7 @@ test.describe('buildScripts/ai/mcpHealthcheck (#11725)', () => {
144152
});
145153

146154
test('production compose wires KB/MC MCP healthchecks before cloud orchestrator startup', () => {
147-
const compose = yaml.load(fs.readFileSync(
148-
new URL('../../../../../ai/deploy/docker-compose.yml', import.meta.url),
149-
'utf8'
150-
));
155+
const compose = readProductionCompose();
151156

152157
expect(compose.services['kb-server'].healthcheck.test).toEqual([
153158
'CMD',
@@ -172,4 +177,21 @@ test.describe('buildScripts/ai/mcpHealthcheck (#11725)', () => {
172177
expect(compose.services.orchestrator.depends_on['kb-server']).toEqual({condition: 'service_healthy'});
173178
expect(compose.services.orchestrator.depends_on['mc-server']).toEqual({condition: 'service_healthy'});
174179
});
180+
181+
test('production compose pins cloud-profile local wake and mailbox boundaries', () => {
182+
const compose = readProductionCompose();
183+
const orchestratorEnv = environmentMap(compose.services.orchestrator);
184+
const memoryCoreEnv = environmentMap(compose.services['mc-server']);
185+
186+
expect(orchestratorEnv).toMatchObject({
187+
NEO_AI_DEPLOYMENT_MODE: 'cloud',
188+
NEO_ORCHESTRATOR_PRIMARY_DEV_SYNC_ENABLED: 'false',
189+
NEO_ORCHESTRATOR_KB_SYNC_ENABLED: 'false',
190+
NEO_ORCHESTRATOR_BRIDGE_DAEMON_ENABLED: 'false',
191+
NEO_ORCHESTRATOR_GOLDEN_PATH_REPO_ENRICHMENT_ENABLED: 'false',
192+
NEO_ORCHESTRATOR_MLX_ENABLED: 'false'
193+
});
194+
195+
expect(memoryCoreEnv.NEO_MAILBOX_DEFAULT_REPLY_POLICY).toBe('blocked');
196+
});
175197
});

0 commit comments

Comments
 (0)