Skip to content

feat(scheduler-v3): add owner-controlled drafts and immutable PDF publications - #57

Merged
spandreou merged 4 commits into
mainfrom
antigravity/scheduler-v3-standard-architecture
Sep 9, 2026
Merged

spandreou merged 4 commits into
mainfrom
antigravity/scheduler-v3-standard-architecture

Conversation

@spandreou

@spandreou spandreou commented Sep 8, 2026 •

Copy link
Copy Markdown
Owner

Behavior

Adds an opt-in Scheduler V3 workspace using headcount coverage, normal/substitute-only employee profiles, standard-shift rotation, weekly target hours, editable drafts and non-blocking business warnings. Owners can save incomplete drafts and explicitly acknowledge warnings when publishing.

Publications reserve unique versions, store the PDF before exposure, and atomically create an immutable snapshot with the latest-period index and synchronized public week/month views. Draft revision checks prevent stale saves. Firestore/Storage retain active OWNER authorization and exclude Platform Admin tenant access; published snapshots/PDFs cannot be overwritten or deleted.

The global VITE_ENABLE_SCHEDULER_V3 flag defaults off and also guards repository operations. Tenant version 3 is separately required. V2 engine/adapter are unchanged, and legacy schedule operations exclude V3 draft rows. No production activation, migration, deployment or merge is included.

Verification

  • 304 V3 engine cases and 17 service cases, including actual PDF generation and failure ordering.
  • Existing V2 contract: 2,118 assertions; legacy scheduler and employee regression suites pass.
  • Browser: existing V2 flows plus V3 mobile/desktop editing, warning acknowledgement and legacy-tool preservation.
  • Real Firebase emulator repository tests: settings/draft roundtrips, stale revisions, concurrent versions, latest-pointer ordering, month/week projections, immutable snapshot/PDF, and cross-tenant/Platform Admin/anonymous denial.
  • Build, repository/public/tenant authorization/auth-broker/export/security checks pass.
  • Audits have no HIGH/CRITICAL findings: root 4 moderate + 1 low; Functions 8 moderate. No dependencies or lockfiles changed.

Review limitations

Draft transactions are bounded to 450 operations. Failed publication attempts may leave unused reservations or orphan immutable PDFs. Time arithmetic uses civil-clock intervals, without DST elapsed-time conversion. Migration is an offline preview with explicit unconverted V2 semantics. No standalone TypeScript typecheck or complete independent final security-scan certification is claimed. Keep this PR draft pending human review and separate production-activation approval.

Full evidence and rollback: docs/SCHEDULER_V3_CONTINUATION_REPORT.md and docs/SCHEDULER_CONTRACT_V3.md.

PR #57 corrective pass — 9 September 2026

Commit: 1050b38fbee280a5e4be130c35a5765df3609b64 (previous reviewed head ece9f8f13fed17d5e0b393511c9ce799b98242b1).

  • Preserve all seven current profile fields for employees added to an open draft; warning/generation consumers and zero-hour statistics covered.
  • Saving configuration does not change tenant scheduler version; activation remains a separately approved step.
  • Complete immutable history view, stored-PDF download and create-new-draft flow. Restoring v1 after v3 publishes v4 without changing old snapshot/PDF bytes.
  • Confirm inline active-only assignments; retain inactive historical references and reset pending state when switching drafts. Quarter-hour selects only.
  • Standard shift plus rotation toggle derives an unambiguous active MORNING/AFTERNOON counterpart and stable internal anchor.
  • Validate all Firestore profile fields and draft metadata, including strict calendar/leap-year dates.

Verification: V3 304+17+8 cases; V2 2,118 assertions; combined browser 5/5 including mobile/desktop and no uncaught page errors; real V3 emulator including malformed-data denials and immutable v1-to-v4 restoration; all requested scheduler, repository, authorization, export, hardening, integrity and build checks pass. Focused independent review found no remaining Critical/Important issue after two extra regressions were fixed.

No new dependencies, lockfile/Actions/secret changes, production data mutation, migration, activation, deploy or merge. No standalone TypeScript compiler was installed; existing build-size and emulator teardown warnings remain documented. Historical restoration fails closed if current profile template references are absent from the historical config. Keep this PR Draft for human review.

@vercel

vercel Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
shiftoryx Ready Ready Preview Sep 9, 2026 12:42pm UTC

@strix-security

strix-security Bot commented Sep 9, 2026

Copy link
Copy Markdown

Strix is installed on this repository, but we couldn't run this PR security review because this workspace's trial has ended. Add a card to resume code reviews here.

@spandreou
spandreou merged commit 44c5fa4 into main Sep 9, 2026
5 checks passed

This branch was successfully deployed

1 active deployment
Preview — f3991b25 Deployed Sep 9, 2026 by vercel[bot]
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