Skip to content

simplify(automation): admit concrete schedules before due decisions - #4551

Merged
ScriptedAlchemy merged 9 commits into
masterfrom
simplify/automation-resolved-schedule
Oct 27, 2026
Merged

ScriptedAlchemy merged 9 commits into
masterfrom
simplify/automation-resolved-schedule

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Why

Refs #4428. Parent link is #4542 on simplify/automation-task-lease.
Fixed tasks and jobs interpreted the same schedule string and interval during validation and each due decision. Resolve that pair at admission so decisions cannot reconstruct conflicting timing states.

What changed

  • Add immutable admitted configurations and jobs with concrete manual, interval, or cron schedules. Fixed-task configuration pins share the admitted value through Arc.
  • Migrate daemon, dashboard, retained-run and user-job scheduling to direct schedule matches. Delete public ConfiguredInterval, the old parser/validator APIs, repeated decision parsing and invalid-to-manual fallbacks.
  • Preserve patch omission/null and explicit-schedule precedence. Refuse invalid persisted schedules at runtime admission without rewriting stored data.
  • Remove the ineffective stale_lock_secs control from current CLI flags, patches, registry writes, and the generated SDK. Effective reads and schedule admission project historical settings into the current representation.

Scope

Blast Radius

Scheduled fixed tasks, host receipts, user jobs and scheduler status use the admitted timing representation. Retry, activity, denial, cancellation and retained settlement behavior stay covered. Three retry fixtures now use a valid one-second cooldown and wait for that boundary instead of bypassing settings with zero.

Prior schedule-admission verification

  • Bazel unit suites pass with automation 39, automation-runtime 434, configuration 38 and dashboard-api 203 tests. Dashboard-api retains one existing ignored manual measurement.
  • Bazel automation runner passes 177 tests. The non-vacuous daemon scheduler-configuration filter passes 17 tests, including revisioned reads, discovery and re-enable.
  • Focused Bazel clippy passes all six targets including daemon unit tests. Rustfmt, diff checks and commitlint pass. No limits or timeouts increased.

Lock-timeout retirement verification

  • Independent source review covered admission, historical serialization, registry revision fencing, and rollback preview/apply consistency. New regressions cover absent/null/numeric history, unchanged admitted schedules, rejected writes, convergence, stale rollback plans, and idempotent replay.
  • The pinned formatter, maintained commit hooks, and generated BUILD check passed; all 60 BUILD files are current. The maintained SDK generator was rerun and its output matches the reviewed retirement changes.
  • New native regressions require hosted CI. The focused local automation test was stopped during dependency compilation when disk headroom became insufficient; it did not execute tests.

Devin Review

Read-only configuration projection follow-up

Read-only project opens can publish a historical configuration pin before registry convergence. The runtime projection now removes retired stale_lock_secs fields from its own automation-settings copy, so raw dashboard configuration reads expose the current settings. The pinned historical snapshot and its digest remain unchanged; invalid schedule text remains inspectable and separate admission still returns its typed error.

A regression constructs real runtime pins from serialized historical snapshots with absent, null, and numeric retired fields, checks unchanged snapshot bytes and digest validation, and exercises valid schedule precedence plus invalid schedule admission. Pinned formatting, diff checks, and normal commit hooks passed. The new native regression has not run locally because of the disk and memory constraints; hosted CI is required.

@changeset-bot

changeset-bot Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: bd4ebc3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

devin-ai-integration[bot]

This comment was marked as resolved.

ScriptedAlchemy added a commit that referenced this pull request Oct 26, 2026
Restack unique #4551 commits onto the rewritten #4542 tip, including the
inactive-job isolation, canonical disabled-backend fixtures, and refreshed
schedule description.
@ScriptedAlchemy
ScriptedAlchemy force-pushed the simplify/automation-resolved-schedule branch from 4d634db to 45fedda Compare October 26, 2026 05:48
ScriptedAlchemy added a commit that referenced this pull request Oct 26, 2026
@ScriptedAlchemy
ScriptedAlchemy force-pushed the simplify/automation-resolved-schedule branch from 45fedda to 0374d13 Compare October 26, 2026 07:15
@ScriptedAlchemy
ScriptedAlchemy changed the base branch from simplify/automation-task-lease to master October 26, 2026 19:08
devin-ai-integration[bot]

This comment was marked as resolved.

@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

Independent premerge verdict: PASS+NOTES.

Reviewed exact head 0374d13303e28e5cbdbfbad395eeaa1423282f81 against current base master at 89d72ecbb6fa123888b3c07d55a1ddcea8a38683. Merge base is 2f00b0ebd5565657d7309e0235f5989e270c6555; the sole unique child commit is 0374d133. Read all 23 owned changed paths after the external rewrites.

Fresh isolated Bazel evidence, each through scripts/require-exact-test.sh, one target per invocation, --nocache_test_results --test_output=all, unchanged timeouts:

  • //crates/tracedecay-automation:unit_test: 39 passed, 0 failed. Its focused config::tests:: run also passed 10/0, including omission/null, precedence and canonical positive durations.
  • //crates/tracedecay-configuration:unit_test: 38 passed, 0 failed, including pinned schedule admission and invalid persisted timing refusal.
  • //crates/tracedecay-automation-runtime:unit_test, filter automation::jobs::scheduler_config_tests::: 11 passed, 0 failed. Includes inactive/manual invalid sibling isolation, invalid persisted schedules without rewrites, immutable timing, history denial and diagnostic deduplication.
  • //crates/tracedecay-daemon-service:unit_test, exact automation_effect::journal_tests::reused_scheduler_skip_abandons_current_effect_before_observing_exact_prior: 1 passed, 0 failed. Retains wrong-task/reason rejection, durable abandonment before observation, lock retention/release and byte-exact unchanged prior ledger/spool assertions.

Source review found immutable private admitted state, pinned runtime ownership, one canonical resolver, and direct admitted due decisions. Host receipt/backend denial remains intact. Disabled-backend fixtures clear model_id; production canonical validation was not relaxed. Manual user-job execution still resolves the requested raw job and validates it at the runner, independently of scheduler selection.

Notes: cross-tick job reloads and runner-boundary readmission remain; this is not full #4428 completion. The generated schema delta is only the resolver documentation name and matches current Rust source; no generation or contract-check claim. The macOS daemon test link emitted a non-failing compact-unwind size warning. No full journeys or hosted required checks were rerun or claimed. No edits, commits, CI restarts or merge actions. Head/base were rechecked and the verification checkout stayed clean.

@ScriptedAlchemy
ScriptedAlchemy enabled auto-merge (squash) October 27, 2026 02:50
ScriptedAlchemy and others added 6 commits October 27, 2026 04:52
Remove the obsolete age override from current CLI and configuration writes.
Project historical settings at effective and scheduled admission boundaries
while keeping stored revisions byte-identical. Reuse canonical retirement
and rollback projection so preview and application agree and cannot revive
the retired field.

Cover absent, null and numeric historical values, admitted schedules,
rejected writes, registry convergence and rollback replay.
Read-only project opens can pin historical settings before registry
convergence. Remove retired lock-timeout fields from the runtime copy so
dashboard configuration reads expose the current settings representation.

Keep the original snapshot and its identity unchanged. Preserve raw schedule
text, including invalid schedules, for inspection while admission retains
its separate typed failure. Cover mixed historical absent/null/numeric
fields, unchanged snapshot bytes, and valid and invalid schedule behavior.
@ScriptedAlchemy
ScriptedAlchemy force-pushed the simplify/automation-resolved-schedule branch from 869ba51 to db9ab48 Compare October 27, 2026 04:54
ScriptedAlchemy and others added 3 commits October 27, 2026 02:56
HostAdmissionTestRuntimeV1::profile opens a runtime rather than reading
one back, so the test did not compile. Build the ProfileRoot from the
test's profile directory like the neighbouring tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Clippy's field_reassign_with_default rejects assigning timeout_secs after
Default::default().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	plugin/chatgpt-extension/embedded/server.mjs
@ScriptedAlchemy
ScriptedAlchemy merged commit bd013b8 into master Oct 27, 2026
17 of 18 checks passed
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