Conversation
AuditAudit artifacts not found. SchemaNo drift detected ✅ CodexNo Codex outputs yet. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 11241e8427
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const envelope = toEntryAnalyzedEnvelope(payload); | ||
| validateEntryAnalyzedEnvelope(envelope); |
There was a problem hiding this comment.
Preserve legacy ENTRY_ANALYZED payload compatibility
This new validation path now rejects payloads that only carry entryId/userId (because toEntryAnalyzedEnvelope defaults missing processingStatus to complete, then validateEntryAnalyzedEnvelope requires non-empty bloomCards), which breaks existing emitters that still send minimal events such as scripts/simulate_nervous_system.js (lines 88-99 and 148-153). In those flows, emitEntryAnalyzed(...) now throws ENTRY_ANALYZED complete status requires cards, so the simulation/experiment path aborts before Crucible side effects can run.
Useful? React with 👍 / 👎.
Motivation
ENTRY_ANALYZEDso downstream consumers can safely rely onschemaVersionandprocessingStatussemantics.Description
server/src/utils/failureFirewallContracts.jsincludingENTRY_ANALYZED_SCHEMA_VERSION,PROCESSING_STATUS,PROCESSING_WARNING_CODE,DROP_REASON_CODE, and aUNANCHORED_SIGNALschema stub.SanitizedError+ utilities inserver/src/utils/failureFirewall.jsto sanitize errors, fingerprint messages, enforce a job-payload whitelist (entryId,taskId), validate/produceENTRY_ANALYZEDenvelopes, and build structured drop-ledger records.agentOrchestrationenforces whitelisted job payloads and sanitizes enqueue-failure messages;eventBus.emitEntryAnalyzednow wraps/validates envelopes before emitting;reflection,scribe, andarchivistworkers enforce whitelists and record only sanitized error metadata (warning codes + fingerprints) instead of raw fragments.server/src/utils/__tests__/failureFirewall.test.ts(whitelist, schema branching, ledger shape),server/src/orchestration/__tests__/eventBus.contract.test.ts(envelope + canary check), a leak-canary test inserver/src/workers/__tests__/reflection.worker.test.ts, and documentationserver/docs/run-b-failure-firewall.md.Testing
pnpm lint:cilocally and it completed successfully (no JS/TS changes detected).node scripts/codex_preflight.mjs --ciand it passed alignment checks.pnpm --filter server exec vitest run src/utils/__tests__/failureFirewall.test.ts src/orchestration/__tests__/eventBus.contract.test.ts src/workers/__tests__/reflection.worker.test.tsand all three test files passed.pnpm --filter server test/pnpm test:ciin the sandbox; the full suite failed in this environment due to missing optional runtime test dependencies (examples:express,supertest,mongoose,langfuse,openai,jsonwebtoken), not due to the new firewall logic itself; targeted unit tests for the new contracts passed.Codex Task