Skip to content

fix(core): harden orchestrator routing and enforcement hooks#350

Open
windoliver wants to merge 1 commit into
mainfrom
fix/core-orchestrator-enforcement-hardening
Open

fix(core): harden orchestrator routing and enforcement hooks#350
windoliver wants to merge 1 commit into
mainfrom
fix/core-orchestrator-enforcement-hardening

Conversation

@windoliver
Copy link
Copy Markdown
Owner

Summary

  • prevent cross-session contribution forwarding in SessionOrchestrator by using a per-role session-id allowlist instead of role-only fallback matching
  • harden orchestrator lifecycle handling by cleaning poll timers/handlers on stop and making waitForCompletion timeout reliably even when idle checks throw
  • ensure EnforcingContributionStore pre-write hooks are always cleaned up on failed enforcement/write paths, and optimize retry-after calculation to a single-pass scan
  • add regression coverage for resumed-session polling, post-stop event handling, timeout-on-errors, and hook lifecycle edge cases

Test plan

  • bunx biome check src/core/session-orchestrator.ts src/core/session-orchestrator.test.ts src/core/enforcing-store.ts src/core/enforcing-store.test.ts
  • bun run typecheck
  • bun test src/core/session-orchestrator.test.ts src/core/enforcing-store.test.ts
  • bun test src/core (tests pass; repo coverage gate can return non-zero)

Made with Cursor

Prevent cross-session contribution forwarding and completion-wait hangs in the orchestrator, and ensure pre-write hooks are always cleaned up on failed enforcement/write paths. Add regression tests to lock down timeout, resume, and hook lifecycle edge cases.

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant