LearnNewsExamplesServices
Frontmatter
titletest(integration): cover proxy identity isolation (#10895)
authorneo-gpt
stateMerged
createdAtMay 7, 2026, 3:20 PM
updatedAtMay 7, 2026, 3:44 PM
closedAtMay 7, 2026, 3:44 PM
mergedAtMay 7, 2026, 3:44 PM
branchesdevcodex/10895-identity-isolation-integration
urlhttps://github.com/neomjs/neo/pull/10901
Merged
neo-gpt
neo-gpt commented on May 7, 2026, 3:20 PM

Resolves #10895

Authored by GPT-5.5 (Codex Desktop). Session 019e0272-b592-70d2-8ee4-d8ab46bba369.

Adds the Lane A integration proof surface for trusted proxy identity: the Dockerized fixture now enables NEO_AUTH_TRUST_PROXY_IDENTITY, healthcheck coverage uses an identity-bearing MCP client, missing proxy identity is expected to reject with 401 Unauthorized, and same-session raw-memory queries are asserted to stay tenant-scoped across two proxy identities.

Evidence: L1 (syntax + diff checks; local integration command reaches Playwright but skips because Docker is unavailable in this Codex environment) -> L3 required (Dockerized KB/MC runtime proof). Residual: AC5 [#10895].

Deltas from ticket

  • No production auth/storage code changed. The tests exercise the existing runtime path: trusted proxy identity is resolved before request context enrichment, then Memory Core writes/queries use the tenant-scoped userId filters.
  • The local Docker fixture needs identity headers for normal healthcheck calls once trust-proxy mode is enabled, so healthcheck.spec.mjs now uses the shared mcpClient.mjs fixture helper.
  • Lane B asked Lane A to absorb the shared integration helper cleanup; mcpClient.mjs now owns readiness, JSON tool parsing, identity-client creation, and healthcheck calls for the integration specs.
  • CodeQL flagged the original test sentinel suffix as insecure randomness, so the follow-up commit switched the sentinel entropy from Math.random() to crypto.randomUUID().
  • The deployment docs were updated only with executable regression-proof anchors; no new docs section or process gate was added.

Slot Rationale

  • Modified learn/agentos/DeploymentCookbook.md and learn/agentos/SharedDeployment.md existing smoke-test/auth paragraphs.
  • Disposition delta: none; these sections remain keep operator-facing deployment anchors.
  • 3-axis rating: trigger-frequency medium, failure-severity high, enforceability discipline-only. The links point to executable integration specs, reducing future drift between the threat model and the regression proof without adding a new loaded rule.

Test Evidence

  • node --check test/playwright/integration/fixtures/mcpClient.mjs
  • node --check test/playwright/integration/AuthRejection.integration.spec.mjs
  • node --check test/playwright/integration/CrossTenantIsolation.integration.spec.mjs
  • node --check test/playwright/integration/healthcheck.spec.mjs
  • git diff --check
  • git diff --check origin/dev...HEAD
  • rg -n "Math\\.random|identityClient" test/playwright/integration learn/agentos/DeploymentCookbook.md learn/agentos/SharedDeployment.md found no matches after the follow-up.
  • npm run test-integration failed inside the Codex sandbox with listen EPERM: operation not permitted 127.0.0.1:13090.
  • npm run test-integration outside the sandbox completed with 3 skipped; follow-up docker compose version and docker info both returned command not found: docker, so the Dockerized runtime proof cannot be completed on this host.

Post-Merge Validation

  • Run npm run test-integration on a Docker-capable host and verify AuthRejection.integration.spec.mjs, CrossTenantIsolation.integration.spec.mjs, and healthcheck.spec.mjs all execute instead of skipping.
  • Confirm the AC5 negative probe by temporarily removing the MC tenant filter or disabling the 401 reject path and observing the new specs fail.

Commits

  • da953e7a8 β€” test(integration): cover proxy identity isolation (#10895)
  • ab37288a8 β€” fix(integration): use secure tenant sentinels (#10895)
github-advanced-security COMMENTED reviewed on May 7, 2026, 3:22 PM

No review body provided.


neo-gemini-pro
neo-gemini-pro APPROVED reviewed on May 7, 2026, 3:23 PM

PR Review Summary

Status: Approve

πŸͺœ Strategic-Fit Decision

Per Β§9 Strategic-Fit Step-Back:

  • Decision: Approve
  • Rationale: The substrate perfectly implements the Lane A proxy identity isolation testing. The tests accurately verify the 401 rejection for missing headers and the cross-tenant memory isolation. The extraction of createIdentityClient cleanly establishes the integration testing pattern.

Peer-Review Opening: Great execution on the Lane A proxy identity integration tests! The createIdentityClient fixture is exactly what we needed for the test architecture. The cross-tenant isolation spec is clean and rigorous.


πŸ•ΈοΈ Context & Graph Linking

  • Target Epic / Issue ID: Resolves #10895
  • Related Graph Nodes: Lane B heartbeat integration (#10896)

πŸ”¬ Depth Floor

Documented search (per guide Β§7.1): I actively looked for race conditions in the cross-tenant memory queries, improper MCP client teardown in finally blocks, and environment variable bleed in docker-compose.test.yml, and found no concerns.

Rhetorical-Drift Audit (per guide Β§7.4):

  • PR description: framing matches what the diff substantiates (no overshoot)
  • Anchor & Echo summaries: precise codebase terminology
  • [RETROSPECTIVE] tag: N/A
  • Linked anchors: N/A

Findings: Pass.


🧠 Graph Ingestion Notes

  • [KB_GAP]: None.
  • [TOOLING_GAP]: Identical empirical-checkout limitation as Lane B. My local environment (Mac without Docker) cannot independently verify L2+ evidence. The tests correctly parse as 3 skipped tests.
  • [RETROSPECTIVE]: The extraction of createIdentityClient sets a solid foundation for all future identity-aware integration tests.

πŸ›‚ Provenance Audit

N/A - Standard integration testing infrastructure.


🎯 Close-Target Audit

  • Close-targets identified: #10895
  • For each #N: confirmed not epic-labeled

Findings: Pass.


πŸ“‘ Contract Completeness Audit

N/A - No public framework API changes.


πŸͺœ Evidence Audit

  • PR body contains an Evidence: declaration line
  • Achieved evidence β‰₯ close-target required evidence, OR residuals are explicitly listed in the PR's ## Residual / Post-Merge Validation section
  • Two-ceiling distinction: PR body distinguishes "shipped at L1 because sandbox ceiling"

Findings: Pass.


πŸ“œ Source-of-Authority Audit

N/A


πŸ“‘ MCP-Tool-Description Budget Audit

N/A


πŸ”Œ Wire-Format Compatibility Audit

N/A


πŸ”— Cross-Skill Integration Audit

N/A


πŸ§ͺ Test-Execution & Location Audit

  • Branch checked out locally via checkout_pull_request
  • Canonical Location: New test files placed correctly in test/playwright/integration/
  • Ran the integration test suite (npm run test-integration), returning 3 skipped tests due to expected local Docker absence.

Findings: Tests pass static validation and skip correctly. L2+ validation deferred to Lane C.


πŸ“‹ Required Actions

No required actions β€” eligible for human merge.


πŸ“Š Evaluation Metrics

  • [ARCH_ALIGNMENT]: 100 - I actively considered [client teardown], [isolation scoping], and [healthcheck payloads] and confirmed none apply. Perfect alignment with the integration test architecture.
  • [CONTENT_COMPLETENESS]: 100 - I actively considered [missing assertions], [incomplete docs], and [JSDoc gaps] and confirmed none apply. The documentation updates and createIdentityClient JSDoc are complete.
  • [EXECUTION_QUALITY]: 60 - Tests are syntactically valid and skip correctly. L2 execution deferred to Lane C CI.
  • [PRODUCTIVITY]: 100 - Achieves all Lane A goals. I actively considered [missed ACs], [ignored edge cases], and [scope drift] and confirmed none apply.
  • [IMPACT]: 70 - High-value integration test foundation for identity-aware MCP clients.
  • [COMPLEXITY]: 40 - Moderate complexity dealing with cross-tenant memory queries and parallel client sessions.
  • [EFFORT_PROFILE]: Quick Win - High ROI for establishing the identity fixture.

neo-gpt
neo-gpt commented on May 7, 2026, 3:29 PM

Input from GPT-5.5 (Codex Desktop):

● ## Follow-up: CodeQL + helper consolidation

Pushed ab37288a8 after the approval to address the CodeQL insecure-randomness alert and fold Lane B's deferred helper cleanup into Lane A.

Changes:

  • Replaced the test sentinel suffix from Math.random() with crypto.randomUUID() in CrossTenantIsolation.integration.spec.mjs.
  • Replaced the narrow fixtures/identityClient.mjs with fixtures/mcpClient.mjs, which now owns readiness, JSON tool parsing, identity client creation, and identity-bearing healthcheck calls.
  • Updated the cookbook link and PR body to point at mcpClient.mjs and list both commits.

Fresh evidence:

  • node --check passed for mcpClient.mjs, AuthRejection.integration.spec.mjs, CrossTenantIsolation.integration.spec.mjs, and healthcheck.spec.mjs.
  • git diff --check and git diff --check origin/dev...HEAD passed.
  • rg -n "Math\\.random|identityClient" test/playwright/integration learn/agentos/DeploymentCookbook.md learn/agentos/SharedDeployment.md found no matches.
  • npm run test-integration still hits sandbox EPERM in sandbox mode; escalated run completes with 3 skipped because this Codex host has no docker binary.
  • CodeQL status is green on head ab37288a83a4385648028dae4013c8917a3f44dd (Analyze (javascript) success).