Repository navigation
Reject malformed legacy scheduler policies before migration - #127
Conversation
Add tests asserting that malformed legacy retry budgets and single-flight values cause scheduling to fail closed in both the in-memory and SQLite stores. The seeded job and the offending policy row are checked to remain untouched so an invalid policy stays available for repair. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Legacy cron policy values were silently clamped or defaulted during migration, so out-of-range retries and non-boolean single_flight flags were accepted without warning. Both the SQLite migration and the document policy reader now validate these fields and fail with an error, leaving the policy table unchanged when the data is malformed. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Tiny Sweeper review
Previous completed reportTiny Sweeper reviewReviewed head: FindingsNo active actionable findings. Advisory notes
Verdict: Ready for maintainer review · Priority: medium Diagnostics and supporting detailsFull summaryPull request purpose (title): Reject malformed legacy scheduler policies before migration. Tiny Sweeper completed its review; deterministic results follow. Review snapshot
Completeness: Complete What changedDocument-store decoding of legacy cron policies now returns an error rather than silently defaulting or clamping when `retries` is non-numeric or out of u32 range, and requires a real boolean for `single_flight`. On the SQLite side, the policy migration query validates legacy column types and value ranges inside its transaction and bails before any update or drop if any row is malformed, removing the prior MIN/MAX clamping. New tests on both sides assert refusal plus preservation of the seeded job and the invalid policy row. Features
TestsNo supported feature-to-test mapping was produced. Test execution is not inferred. Before mergeNone. Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
Main removed the module-owned sqlite store; the malformed legacy policy fail-closed behaviour is kept in tinyflows-drivers. Co-authored-by: Medulla <medulla@tinyhumans.ai>
The test helper now imports CollectionSpec from tinystoragedrivers_api instead of the removed tinystoragedrivers_core crate, keeping the malformed legacy policy test compiling against the current dependency layout. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The malformed legacy policy test now imports CollectionSpec from tinystoragedrivers_types instead of tinystoragedrivers_api, matching the crate that actually exports it. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Paused at the user's request — draft, do not merge
Implementation stopped at the current committed checkpoint. The user asked to stop, commit/publish existing work and pause. Final validation was canceled intentionally; no canceled run is counted as passing. Normal Git push hooks remain enabled. A successful push is not evidence that the repository's separately required explicit project-hook validation completed.
Summary
Reject malformed legacy retry budgets and single-flight values before migrating cron policies. Document-store decoding now checks u32 bounds and requires a real boolean; SQLite validates legacy storage types and values before its transactional update/drop.
Validation
Actual unfixed owner tests produced three runtime failures: document retries, document single-flight and SQLite budget coercion. This established RED, not a compiler-only failure. The subsequent focused GREEN candidate45571 was canceled143 while queued at the user's request, before running. Formatting/source review passed; final owner tests and full gates have not passed.
Remaining work before ready
Run the strict-malformed regression GREEN and full owner gates. Deterministically prove/fix document policy CAS migration and nontransactional refusal; extend SQLite malformed-type and separately located legacy-policy fixtures. This narrow commit does not claim complete scheduler host migration or concurrency safety. External prepared tests are preserved as unapplied artifacts and are not shipped as implemented tests.
Commit
84381aa. Preserve the preceding granular RED fixture commitc39737d.
Related
Prerequisite for OpenHuman #7397; no claim to close that host issue.