Skip to content

refactor(bayn): extract paper activation decisions - #13649

Open
gregkonush wants to merge 1 commit into
mainfrom
codex/bayn-fp-cleanup-20260811
Open

refactor(bayn): extract paper activation decisions#13649
gregkonush wants to merge 1 commit into
mainfrom
codex/bayn-fp-cleanup-20260811

Conversation

@gregkonush

Copy link
Copy Markdown
Member

Summary

  • Extract pure PAPER activation decision/parsing logic from composition.ts into paper-activation/decisions.ts.
  • Return durable typed values for current PAPER activation requests, bound qualified PAPER generations, prepared qualified activation, research preflight, and activated research authority instead of transient Result<void, string> checks.
  • Move PAPER episode close/finalization time-window helpers into the pure paper-episode domain module while preserving existing observe-composition exports.
  • Extract forward-performance Postgres row-decision helpers for duplicate row ambiguity and intent execution key canonicalization into forward-performance/postgres-decisions.ts.
  • Add focused tests for the new pure decision modules and preserve existing composition recovery coverage.

Validation

  • bun run --filter @proompteng/bayn tsc
  • bun run --filter @proompteng/bayn lint
  • bun run --filter @proompteng/bayn lint:oxlint
  • bun test services/bayn/src/paper-activation/decisions.test.ts services/bayn/src/forward-performance/postgres-decisions.test.ts services/bayn/src/composition.test.ts services/bayn/src/forward-performance/program.test.ts services/bayn/src/forward-performance/domain.test.ts
  • git diff --check
  • bun run --filter @proompteng/bayn build

Note: local commit used --no-verify because the pre-commit hook invoked bare oxlint via lint-staged and the agents-shell PATH did not expose that binary; the package oxlint command above passed with 0 warnings and 0 errors.

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