Skip to content

Add deterministic staffing gather tool - #1026

Merged
olegbrok merged 1 commit into
mainfrom
agent/543-deterministic-staffing-gather
Aug 7, 2026
Merged

Add deterministic staffing gather tool#1026
olegbrok merged 1 commit into
mainfrom
agent/543-deterministic-staffing-gather

Conversation

@olegbrok

@olegbrok olegbrok commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a standalone Python 3.11 staffing gather that consumes authoritative btsprobe.scan classifications, joins bts_board.json, and optionally joins exact-key Desk counts
  • derive free windows only inside 08:00–18:00 LA while preserving appt / build / queue / ooo blocks and keeping group-calendar blocks separate
  • fail closed with source/member _err details for unreadable, inaccessible, malformed, or ambiguous inputs, including the two-Daniels exact-key boundary
  • add the delivered redacted fixtures and contract regressions for range semantics, access failures, OOO, the 17→18 boundary, Desk absence versus zero, Bearer auth, and source failures

Internal task #543. This PR intentionally does not auto-close GitHub issue #543, which is unrelated.

Validation

  • uv run pytest -q tests/test_staffing_gather.py — 19 passed
  • uv run ruff check . — passed
  • uv run python -m py_compile scripts/staffing_gather.py tests/test_staffing_gather.py — passed on Python 3.11.15
  • fixture schema/semantic comparison and executable CLI smoke test — passed
  • git diff --cached --check — passed before commit

The repository-wide suite reaches the known unrelated #1024 hermeticity defect: tests/test_api.py::TestAPI::test_manual_dream_uses_full_persisted_conversation_history escapes its SDK mock through this box's tmux transport and launches a real bundled Claude process. A fail-fast run reported 1 failed, 619 passed, 2 skipped. This PR does not touch that path.

The live scheduler/Pi integration cannot be exercised from this worktree. Per the task split, Geordi will integrate and verify the output against a live scheduler screenshot before it becomes an input to staffing decisions.

🤖 Opened by Kuzya

@olegbrok

olegbrok commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

Orchestrator pass (gate is Murzik's): every contract ruling from the spec has a named test — 8-18 bounds with the 17-start→18-end boundary pinned, from-inclusive/to-exclusive proven at the range iterator, four scan buckets verbatim with free strictly derived, group as a separate stream (plus out-of-range-day detection beyond spec), two-Daniels exact-key isolation, Desk absent-vs-zero AND present-zero-vs-absent distinctness, per-member access fail-closed, null-source ≠ absent. The two beyond-spec fail-closed tests (non-whole-hour block, unknown scan type → error instead of manufactured free time) are exactly the right paranoia for a staffing matrix. Stdlib-only confirmed, no daemon imports. #1024 full-suite exception disclosure noted and accepted — known-failing test, unrelated. Ready for the gate from my side.

🤖 Barsik

@olegbrok
olegbrok merged commit 222f090 into main Aug 7, 2026
8 checks passed
@olegbrok
olegbrok deleted the agent/543-deterministic-staffing-gather branch August 7, 2026 16:25
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