docs: align scheduling review references

This commit is contained in:
lda
2026-09-10 02:18:02 +07:00 Verified
parent f8ed8e2192
commit 0813b9fcfc
5 changed files with 81 additions and 14 deletions
+6 -4
View File
@@ -58,10 +58,12 @@ Reuse the scheduler, activation, lineage, and reducer-aware barrier machinery:
- [`ADR-0006: explicit fork and topology-driven gather`](adr/0006-explicit-fork-and-topology-driven-gather.md)
- [`Draft contract and verification gates`](superpowers/specs/2026-09-06-fork-gather-design.md)
Production planning remains gated on correlation analysis and merge-order
semantics. The draft records two reproduced reference-model defects and points
to archived runnable research; passing that prototype's tests is not approval
to copy it into the runtime.
Production planning remains gated on correlation analysis, merge-order
semantics, and closure of the draft's owner-completion, failure-cleanup,
scope-boundary, occurrence-state, and checkpoint-integration decisions. The
draft records two reproduced reference-model defects and points to archived
runnable research; passing that prototype's tests is not approval to copy it
into the runtime.
The isolated
[`reference verification plan`](superpowers/plans/2026-09-07-fork-gather-reference-verification.md)
+8 -5
View File
@@ -141,9 +141,13 @@ and the Python client (`App` schedule methods) share these operations:
## Hypothetically used as follows
EXECUTABLE example (runs in CI as
`tests/examples/test_scheduled_deployment_example.py`; run it with
`uv run pytest -q tests/examples/test_scheduled_deployment_example.py`):
The complete runnable setup is covered by
[`tests/examples/test_scheduled_deployment_example.py`](../tests/examples/test_scheduled_deployment_example.py)
(run it with `uv run pytest -q tests/examples/test_scheduled_deployment_example.py`).
The abbreviated sequence below is illustrative rather than executable as
written because it elides setup details:
ILLUSTRATIVE example (the runnable test above contains the complete setup):
```python
server = build_local_static_workflow_server(root, schedules=True)
@@ -168,8 +172,7 @@ page = await server.api.schedules.list_schedule_occurrences(
await service.stop()
```
ILLUSTRATIVE example (not executed; shows a cron week with an operator
pause — same calls, longer horizons):
Longer-horizon operator example (also illustrative and not executed):
```python
# Monday: an hourly report, latest-wins catch-up, at most two at once.
@@ -0,0 +1,59 @@
# CodeRabbit 103: Selected Scheduling Corrections
**Status:** active
**Branch:** `opencode/sched-verify-plan`
**Base under review:** current `HEAD` (`898a250c` at plan start)
**Scope:** selected findings from `random shit/rabbitreview/103.txt`; no merge,
push, main-worktree edits, ORM, client-page redesign, broad DTO changes, or
valid Python 3.14 syntax rewrites.
## Invariants
- Every schedule mutation is a synchronous compound operation executed while
the complete `FileScheduleStore.transaction()` is held. Its async public
method only delegates; no arbitrary coroutine is awaited under the store's
`threading.RLock`.
- History interval identity is based on aware UTC endpoints. A half-specified
or naive interval is rejected; an entry with no interval keeps its existing
created-time identity.
- Event-loop lock retries back off briefly without changing cancellation-safe
cleanup, task registration, or shutdown joining.
- Existing crash ordering, revision checks, admission authority, and
no-replay recovery semantics remain unchanged.
## Work sequence
- [ ] Reproduce the selected test weaknesses and inspect current callers,
then add red-first regression coverage for API/poll transaction ordering,
interval identity, and the selected test-boundary hazards.
- [ ] Refactor schedule mutations into synchronous transaction-wrapped
operations while preserving public async signatures and behavior. Verify
concurrent admin/poll behavior and existing torn-write tests.
- [ ] Normalize and validate history interval identity; add equivalent-offset,
invalid-endpoint, and duplicate-prevention tests.
- [ ] Add nonzero asynchronous lock backoff and rerun lifecycle, shutdown,
deadlock, cancellation, and settlement pins.
- [ ] Move pure `walk_expression_paths` traversal to the shared input-binding
model layer, update imports/docs/tests, apply `expected_revision >= 1`,
consistent `OccurrenceKind` identity annotations, and PEP 604 dispatch
unions.
- [ ] Harden selected pagination, protocol, durability, subprocess, timer,
and controlled revision-race tests. Keep test-only cleanup separate from
production correctness.
- [ ] Correct the four selected documentation statements and lint every
changed Markdown file.
- [ ] Run focused suites, Ruff, formatting, basedpyright, and diff-check;
obtain a fresh independent review when available; re-review confirmed fixes
and interactions before final handoff.
- [ ] Archive this completed plan under `docs/historical/superpowers/plans/`
and update any live links if needed.
## Verification targets
Focused checks include `tests/wf_api/test_schedules.py`,
`tests/scheduling/test_history_reconcile.py`, `tests/scheduling/test_poll.py`,
`tests/scheduling/test_lifecycle.py`, `tests/scheduling/test_lock_identity.py`,
`tests/wf_api/test_resume_attempt.py`, `tests/wf_transport_rpc_http/`,
`tests/artifacts/test_store.py`, and `tests/core/test_input_sources.py`, plus
the existing lifecycle/resume/shutdown/recovery pins. Full-repository failures
will be compared with the actual feature base before being called pre-existing.
+7 -5
View File
@@ -1287,11 +1287,13 @@ that every suite was rerun during this document revision.
## Current Walkthrough Check
During this revision on September 7, 2026, the Python blocks in the report
walkthrough were executed in order against the example server configuration
with an isolated temporary store. An in-process client port substituted for
the HTTP connection. The check exercised discovery, graph construction,
validation, saving, deployment, execution, refresh, and trace inspection.
During this revision on September 7, 2026, an adapted version of the Python
blocks in the report walkthrough was executed as an in-process smoke check
against the example server configuration with an isolated temporary store.
The adapted check used an in-process client port in place of the displayed
HTTP connection; the walkthrough blocks were not executed unchanged. It
exercised discovery, graph construction, validation, saving, deployment,
execution, refresh, and trace inspection.
The fixed fixture produced the expected title, three action items, and
Markdown heading. A deliberate invalid output binding was rejected before
+1
View File
@@ -249,6 +249,7 @@ WorkflowApi
artifacts: WorkflowArtifactApi
deployments: WorkflowDeploymentApi
runs: WorkflowRunApi
schedules: WorkflowScheduleApi
```
These domain services are allowed to return `dict[str, Any]` payloads because