-
Notifications
You must be signed in to change notification settings - Fork 0
Release Samsarix Routine Engine 0.2 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
da7f026
feat: add bounded deterministic execution plans
Deathcharge b6768a8
feat: checkpoint and resume interrupted routines
Deathcharge ab2fa08
feat: publish the v0.2 workflow contract
Deathcharge ed3ec48
test: isolate example plugin import path
Deathcharge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,49 +1,54 @@ | ||
| # Samsarix Routine Engine roadmap | ||
|
|
||
| This roadmap separates four gates: merge, release, publication, and flagship adoption. Passing one does not imply the next. | ||
| This roadmap separates repository readiness, package publication, and portfolio adoption. Passing one gate does not imply the next. | ||
|
|
||
| ## Product boundary | ||
|
|
||
| Portfolio role: **reusable library or sdk**. Keep this as a small, independently versioned package. Samsarix Unified should consume it only through a public API adapter; private monorepo imports and copied implementations are out of scope. | ||
| Routine Engine is a reusable, independently versioned SDK for bounded application-owned workflows. It is not a hosted orchestrator. Consumers integrate through the exported Python API, workflow schema v1, CLI behavior, and portable result records—not private repository imports. | ||
|
|
||
| Current disposition: Merge the productization branch after exact-head verification and rollback-ref creation; release and adoption remain separate decisions. | ||
| ## Version 0.2 release candidate | ||
|
|
||
| ## Stabilize the productized default | ||
| Implemented on the 0.2 branch: | ||
|
|
||
| - Keep the default branch buildable from a clean checkout and preserve exact-head CI evidence. | ||
| - Keep Samsarix LLC branding, package identity, license metadata, and compatibility aliases internally consistent. | ||
| - Preserve the pre-productization default under a rollback ref before merging; do not delete legacy history. | ||
| - The productization work is now committed, pushed, clean, and green in hosted checks. | ||
| - Next: prove one consumer, enforce payload and storage limits, and pin the supported release contract. | ||
| - Review priority: Capture dirty work deliberately. | ||
| - Review priority: fix license and payload/storage limits. | ||
| - Review priority: pin CI. | ||
| - Review priority: green tests/build. | ||
| - Review priority: prove one consumer or freeze. | ||
| - Explicit workflow schema v1 and a distributable JSON Schema. | ||
| - Deterministic execution plans and a CI-friendly `plan` command. | ||
| - Bounded definitions, inputs, outputs, JSON depth, errors, retries, and concurrency. | ||
| - Non-blocking synchronous actions under bounded local concurrency. | ||
| - Atomic run creation, per-step checkpoints, history inspection, and crash-safe resume of successful work. | ||
| - State schema v2 with version 1 migration and a 64 MiB cap. | ||
| - A release-readiness consumer fixture and evidence-backed competitive boundary. | ||
|
|
||
| ## Release candidate | ||
| Release gates still required: | ||
|
|
||
| - Build and install the wheel in a clean environment. | ||
| - Prove one real consumer and a versioned compatibility fixture. | ||
| - Publish only after package-name ownership, licensing, provenance, and rollback are recorded. | ||
| - Build and inspect both sdist and wheel from a clean tree. | ||
| - Install the wheel into a clean environment and run API, CLI, schema, and consumer smoke tests. | ||
| - Pass the supported Python matrix, lint, formatting, strict typing, branch coverage, dependency audit, and source security scan. | ||
| - Record the exact commit, artifact digests, hosted checks, and rollback ref in the release pull request. | ||
|
|
||
| Current hardening backlog: | ||
| ## Publication | ||
|
|
||
| - The entire candidate is uncommitted and absent remotely. | ||
| - No total workflow-file, nesting, persisted-record, output, or error-message size cap. | ||
| - Sync actions can block the event loop; actions have no timeout, isolation, idempotency key, compensation, or durable queue. | ||
| - Local JSON persistence is single-process and may retain secrets in plaintext. | ||
| - The market already has many DAG/workflow libraries; differentiation is weak without a portfolio consumer. | ||
| - License metadata is stale and internally risky: the BSL names Helix Collective and “Helix Licensing System,” has no Additional Use Grant, and does not clearly identify this package. | ||
| - Untracked CI and all static implementation claims remain unverified. | ||
| Publication is a separate owner decision. Before publishing to a package index: | ||
|
|
||
| ## Samsarix adoption | ||
| - Confirm package-name ownership and Samsarix LLC publishing credentials. | ||
| - Confirm that the Business Source License terms and metadata are the intended commercial policy. | ||
| - Tag an immutable version and attach artifact hashes and release notes. | ||
| - Document the supported compatibility window and vulnerability response process. | ||
|
|
||
| - Define a public API, event, schema, artifact, or deployment contract before connecting to Samsarix Unified. | ||
| - Add a consumer-owned contract fixture covering authentication, privacy, limits, errors, and version compatibility. | ||
| - Make one implementation canonical; remove or freeze duplicate behavior only after parity and rollback are proven. | ||
| - Record an owner, support level, compatibility window, and measurable adoption signal. | ||
| ## Portfolio adoption | ||
|
|
||
| - Integrate one Samsarix application through workflow schema v1 or the public Python API. | ||
| - Keep consumer-owned fixtures covering limits, failures, resume behavior, privacy, and version compatibility. | ||
| - Measure whether the engine removes bespoke orchestration code or improves restart/audit behavior. | ||
| - Add adapters only when a real consumer proves the need; do not grow into a generic control plane speculatively. | ||
|
|
||
| ## Candidate follow-ups | ||
|
|
||
| - Optional per-step timeouts with clearly documented thread-cancellation limits. | ||
| - Pluggable persistence behind a small checkpoint protocol for applications needing database-backed coordination. | ||
| - First-class idempotency metadata and application-defined compensation hooks. | ||
| - Structured lifecycle events for observability adapters. | ||
| - A documented schema/version deprecation policy before 1.0. | ||
|
|
||
| ## Completion evidence | ||
|
|
||
| A milestone is complete only when its exact commit, commands and results, artifact digest, consumer or deployment, and rollback path are recorded in a pull request or release record. README claims must not exceed that evidence. | ||
| A milestone is complete only when its exact commit, commands and results, artifact digest, consumer or deployment, and rollback path are recorded. README claims must not exceed that evidence. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| """Reproducible local scheduler benchmark; not a CI timing gate.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import argparse | ||
| import statistics | ||
| import time | ||
|
|
||
| from routine_engine import RoutineEngine | ||
|
|
||
|
|
||
| def main() -> None: | ||
| parser = argparse.ArgumentParser() | ||
| parser.add_argument("--steps", type=int, default=256, choices=range(1, 257)) | ||
| parser.add_argument("--runs", type=int, default=20) | ||
| args = parser.parse_args() | ||
| if args.runs < 1: | ||
| parser.error("--runs must be positive") | ||
|
|
||
| engine = RoutineEngine() | ||
| engine.register("noop", lambda _: None) | ||
| workflow = { | ||
| "id": "scheduler-benchmark", | ||
| "max_concurrency": 32, | ||
| "steps": [{"id": f"step-{index}", "action": "noop"} for index in range(args.steps)], | ||
| } | ||
| engine.plan(workflow) | ||
| durations = [] | ||
| for _ in range(args.runs): | ||
| started = time.perf_counter() | ||
| result = engine.run(workflow) | ||
| assert result.succeeded | ||
| durations.append(time.perf_counter() - started) | ||
|
|
||
| median = statistics.median(durations) | ||
| p95 = sorted(durations)[max(0, int(len(durations) * 0.95) - 1)] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Use a ceiling rank for p95. Line 36 floors the percentile rank. For run counts not divisible by 20, it reports a lower order statistic. For example, two runs select the minimum value. Use Proposed fix import argparse
+import math
import statistics
import time
@@
- p95 = sorted(durations)[max(0, int(len(durations) * 0.95) - 1)]
+ p95 = sorted(durations)[math.ceil(len(durations) * 0.95) - 1]🤖 Prompt for AI Agents |
||
| print(f"steps={args.steps} runs={args.runs} median_ms={median * 1000:.2f} p95_ms={p95 * 1000:.2f}") | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Deathcharge/routine-engine
Length of output: 311
🏁 Script executed:
Repository: Deathcharge/routine-engine
Length of output: 8109
Align the 0.2 release state across release docs.
CHANGELOG.mdreports0.2.0as released and links tov0.2.0, while nov0.2.0tag exists.ROADMAP.mdanddocs/PRODUCTIZATION.mdstill say public release tagging and package upload remain release-candidate/owner steps.Unreleased, or create thev0.2.0tag if this change is meant to be released as0.2.0.ROADMAP.mdanddocs/PRODUCTIZATION.mdso they do not contradict a published release state.📍 Affects 2 files
CHANGELOG.md#L7-L8(this comment)CHANGELOG.md#L38-L39ROADMAP.md#L9-L27🤖 Prompt for AI Agents