Skip to content

Build operations orchestration workspace - #24

Draft
recklessnode wants to merge 3 commits into
mainfrom
codex/operations-orchestration
Draft

Build operations orchestration workspace#24
recklessnode wants to merge 3 commits into
mainfrom
codex/operations-orchestration

Conversation

@recklessnode

@recklessnode recklessnode commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #15.
References #13, #12, and #2.

This PR adds the ATOS Operations orchestration layer now that dispatch and simulation are merged. It introduces a React-free @atos/operations package and a new Operations workspace that consumes structured replanning requests from simulation, projects runtime state back into dispatch, reconciles reservations, compares planning generations, correlates incidents, tracks deficiency outcomes, and exposes deterministic operator controls.

Operations Architecture

  • Adds packages/operations as a framework-independent package.
  • Keeps simulation as the event/runtime source and dispatch as the planner boundary.
  • Stores operations sessions with stable session IDs and deterministic planning-generation IDs.
  • Preserves historical scenarios and mission plans, then creates projected dispatch inputs for new generations.
  • Treats replanning as an explicit operations decision, not hidden simulation behavior.

Package Boundary Decisions

  • @atos/operations imports dispatch and simulation types/utilities but does not import React.
  • UI-only presentation stays under apps/web/src/features/operations-workspace.
  • Runtime planning constraints are accepted by @atos/dispatch through typed planner options so Operations can pass retained reservations, unavailable resources, scoped chits, and power constraints without creating a second planner.
  • Build metadata is isolated in apps/web/src/build-metadata.ts and injected by Vite.
  • The versioning policy is documented in docs/versioning.md.

Audit Remediation

The follow-up commit addresses the PR #24 audit blockers:

  • Runtime occupancy, held/active reservations, outages, faulted assets, active consists, power constraints, and remaining chit quantities are now passed into the revised dispatch input and consumed by planning.
  • Duplicate reservation ownership is capacity-aware and blocks promotion of a conflicting generation instead of only reporting it.
  • Partial replanning now scopes dispatch to affected chits, retains unaffected reservations, and merges preserved unaffected mission plans back into the revised generation.
  • Partially fulfilled chits project remaining quantities; already-loaded chits are marked active so they are not duplicated into fresh plans.
  • Incident correlation resolves retained/released reservation IDs to actual resource IDs.
  • Metrics now derive passenger/cargo classification from normalized chit metadata, calculate utilization from mission time, calculate empty movement from route/chit content, and calculate churn from plan diffs.
  • Successful replanning hands the session runtime to the promoted dispatch generation while preserving compatible in-progress runtime state and future events.

Replanning Policy

The deterministic policy classifies triggers as:

  • no replan: completed or cleared conditions;
  • deferred replan: released high-priority assets;
  • partial replan: mission failures, blockages, reservation conflicts, asset failures, battery/power failures, service outages;
  • full replan: missed deadlines, queue growth, and manual operator requests.

Policy decisions include stable IDs, rationale, scope, and operator-readable reasoning. Partial replans constrain dispatch to the affected mission/chit scope while retaining unaffected reservations and mission plans.

Runtime Projection

The projection layer converts simulation state into dispatch input by carrying forward:

  • asset locations, availability, health, SoC, active mission, and consist membership;
  • remaining chit quantities and loaded/satisfied/failed progress;
  • active guideway/service occupancy and active or held reservations;
  • unavailable resources from faults and service outages;
  • power constraints and current simulation time.

The original scenario and historical generations are not mutated.

Reservation Reconciliation

Reservation reconciliation classifies reservations as historical, retained, superseded, released, new, or active occupancy. It preserves active in-transit occupancy, releases obsolete reservations, detects duplicate ownership against known resource capacities, and prevents promotion when overlapping owners exceed capacity.

Plan Diff, Deficiencies, Incidents, And Metrics

  • Plan diffs identify unchanged, delayed, cancelled, and replacement missions with route, consist, reservation, satisfied-chit, deadline, score, power, and energy comparisons.
  • Deficiency carry-forward marks issues as resolved, worsened, unchanged, superseded, or transformed and aggregates recurring infrastructure findings.
  • Incident correlation links faults/events/replanning requests, affected assets/resources, old and new generations, deficiencies, and outcomes.
  • Metrics cover completion/on-time rates, passenger/cargo waits, asset utilization, empty movement, replan and reservation-conflict rates, energy delays, failures by cause, deficiency recurrence, and planning churn.

Operations Workspace

Adds an Operations workspace with:

  • active generation and execution summary;
  • pending requests and policy decisions;
  • deterministic manual-replan control;
  • plan diff and reservation reconciliation views;
  • incidents, deficiency carry-forward, and metrics;
  • stable-ID map highlighting and live occupancy overlays;
  • phone-width responsive layout.

Deployment Freshness Footer

Adds a persistent footer with repository link, version, short SHA, deployed commit date, and build mode. Vite injects build metadata from Git/env where available and falls back truthfully for local builds.

AI Provenance

The exact runtime model name is not exposed by this Codex environment. Role boundaries requested by the issue prompt were followed conceptually, but the machine-readable provenance ledger records the observable model/runtime as inherited-model-unreported with model_override_available: false. No source-file authorship headers were added.

Validation

Passed locally after the audit remediation:

  • npm test -w @atos/operations
  • npm run lint
  • npm test
  • npm run build
  • VITE_BASE_PATH=/ATOS/ npm run build
  • NDJSON provenance validation with node --input-type=module -e ...

The /ATOS/ Pages build succeeds. Vite reports the existing large chunk warning after minification; it does not fail the build.

Known Limitations

  • The runtime handoff preserves compatible in-progress execution state and future events, but it does not add a new simulator execution model or hidden dispatch replanning.
  • No browser screenshots were recaptured for this PR. Chromium is not used in this environment per project preference.
  • No GitHub Actions checks were attached at PR creation time.

Explicit Non-Goals Confirmed

This PR does not add hardware control, backend persistence, authentication, continuous physics, hidden simulation replanning, layout mutation, physical telemetry, vehicle animation, route reservation editing, or simulator behavior outside the existing structured replanning boundary.

OpenClaw System Agent added 2 commits July 17, 2026 02:19
Adds the React-free @atos/operations package, deterministic replanning policy/projection/reconciliation/plan-diff/incident/metrics orchestration, the Operations workspace, build metadata footer, and prototype versioning documentation.

AI-Requested-Role: Issue #15 operations implementation

AI-Actual-Model: inherited-model-unreported

AI-Model-Override-Available: false

AI-Execution-Environment: Codex

AI-Issue: #15

AI-PR: pending
Adds machine-readable provenance entries for the Issue #15 operations orchestration PR without changing behavior, architecture, UI, tests, or screenshots.

AI-Requested-Role: provenance follow-up

AI-Actual-Model: inherited-model-unreported

AI-Model-Override-Available: false

AI-Execution-Environment: Codex

AI-Issue: #15

AI-PR: #24

Copy link
Copy Markdown
Owner Author

PR #24 audit — remaining acceptance blockers

The package/UI/footer structure is focused and the basic deterministic orchestration scaffolding is useful, but Issue #15 is not yet complete.

  1. The revised plan does not consume runtime constraints. projectRuntimeStateToDispatchInput() calculates active reservations, occupied/unavailable resources, consist IDs, and power-constraint IDs, but dispatchInput is created only from the lightly modified scenario. The planner therefore does not receive active reservations, guideway/service occupancy, current resource outages

Copy link
Copy Markdown
Owner Author

PR #24 audit continuation:

  • Apply runtime occupancy, active reservations, outages, active consists, power constraints, and remaining chit quantities to the planner input itself.
  • Duplicate reservation conflicts are only reported; they must block promotion of the revised generation.
  • Partial replanning currently runs the same full-queue planner as full replanning. Prove unaffected missions and reservations remain unchanged.
  • Partial fulfillment is not projected; loaded or partly unloaded quantities can be replanned in full.
  • Incident affectedResourceIds currently receives reservation IDs. Resolve them to actual resource IDs.
  • Required metrics are not yet meaningful: empty movement is hard-coded to zero, passenger/cargo uses ID text, utilization is only a snapshot, and queue wait uses planned mission start rather than chit readiness.
  • After replanning, session.runtime still belongs to the old dispatch result. Add and test a safe execution handoff for the revised generation.

Keep PR #24 in draft and Issue #15 open. Add regressions for each item and rerun tests, lint, normal build, and the /ATOS/ Pages build.

END PR #24 AUDIT

Apply runtime constraints to dispatch replanning, scope partial replans, block conflicting generation promotion, improve incident resources and metrics, hand off runtime to the promoted generation, and add deterministic regressions.

AI-Requested-Role: PR #24 audit remediation

AI-Actual-Model: inherited-model-unreported

AI-Model-Override-Available: false

AI-Execution-Environment: Codex

AI-Issue: #15

AI-PR: #24
@recklessnode

Copy link
Copy Markdown
Owner Author

PR #24 audit remediation pushed in 78091cb.

Addressed blockers:

  • runtime occupancy, retained reservations, outages, active/faulted assets, power constraints, and remaining chit quantities now flow into dispatch planner constraints;
  • duplicate reservation ownership is capacity-aware and blocks generation promotion when owners exceed capacity;
  • partial replanning is scoped to affected chits and preserves unaffected plans/reservations;
  • partially fulfilled chits project remaining quantities, and already-loaded chits are marked active to avoid duplicate planning;
  • incident resource correlation resolves reservation IDs to actual resource IDs;
  • metrics now derive passenger/cargo classification from chit metadata and compute utilization, empty movement, and churn from runtime/plan data;
  • successful replans hand session runtime to the promoted dispatch generation while preserving compatible in-progress state/events.

Validation passed locally:

  • npm test -w @atos/operations
  • npm run lint
  • npm test
  • npm run build
  • VITE_BASE_PATH=/ATOS/ npm run build
  • NDJSON provenance validation with node --input-type=module -e ...

No Chromium/screenshots were used.

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.

Build closed-loop operations, replanning orchestration, and deployment freshness metadata

1 participant