Datacenter Twin Lab reference handbook

Inspect the model equations, reproduce the examples, and distinguish software evidence from external review and facility validation.

Reviewed 2026-11-19 · Source d8dc3773830a. This is a dated documentation snapshot.

Browse reference chapters

Documentation index

This reference package connects the repository's established tutorials and contracts to the implementation reviewed at d8dc3773830a397409a7a9c00a6ffed33c46fb4b, dated 19 November 2026. The software remains version 2.0.1; new documentation does not announce a new release.

Read the reference handbook · Project README · Existing quickstart · Canonical battery case · Offline four-module companion

Choose a question

Canonical output map

Each requested output has an actual canonical file. Existing CFF/security content is preserved and verified rather than replaced with generic policy text. Existing README, contribution guidance, changelog and roadmap history remain intact, with additive reference sections.

Canonical document Purpose
README.md Established project entry, preserved capability/history and added reference navigation
CONTRIBUTING.md Existing contribution rules plus source/evidence and handbook maintenance
CHANGELOG.md Historical releases preserved; clearly unreleased documentation entry
CITATION.cff Preserved known author, release 2.0.1/date and declared CFF 1.2.0 metadata
SECURITY.md Preserved local trust, file-output and private reporting boundaries
ROADMAP.md Historical milestones plus traceable twelve-month proposed plan
docs/INDEX.md Canonical map across developer, science, maintainer and owner references
docs/developer/ARCHITECTURE.md Separate model/runtime routes and publication systems
docs/developer/SETUP_AND_REPRODUCIBILITY.md Source/locked setup, exact limits and documentation build
docs/developer/API_CLI_AND_INTERFACES.md CLI, nine business HTTP routes, library/worker/UI/data contracts
docs/developer/WORKED_EXAMPLES_AND_LABS.md Seven labs with independent arithmetic and observed scope
docs/developer/TROUBLESHOOTING.md Boundary-specific symptoms, causes and safe reproducible next steps
docs/math-and-physics/EQUATIONS_AND_DERIVATIONS.md Implemented equations, controls, state models, solvers and signs
docs/math-and-physics/PARAMETERS_AND_SYMBOLS.md Fields, accepted domains, units and normalized-state glossary
docs/math-and-physics/ASSUMPTIONS_AND_LIMITS.md Scientific, interface, provenance and verification boundaries
docs/maintainer/VERIFICATION_EVIDENCE_LEDGER.md Dated source commands, digests, historical CI and unverified stages
docs/maintainer/CI_CD_AND_RELEASE_PLAYBOOK.md Seven workflows, current-policy checks and distinct publishing routes
docs/maintainer/TOOLCHAIN_AND_DEPENDENCY_MATRIX.md Declared pins versus available versions; update order and rights
docs/maintainer/FAILURE_MODES_AND_TECH_DEBT.md Source-specific findings, environment limits and mapped proposals
docs/maintainer/DOCS_MAINTENANCE_RUNBOOK.md Canonical docs, renderer, source preservation and independent review
docs/owner/ADR/ADR-0000-INDEX.md Observed source decisions separated from proposed new decisions
docs/owner/GOVERNANCE_AND_SCOPE.md Known ownership/rights and suggested responsibilities without invented approvals
docs/owner/BUS_FACTOR_RECOVERY_RUNBOOK.md Recover source, toolchain, evidence, docs and missing publisher boundaries
docs/owner/PORTFOLIO_INTEGRATION.md Public export/status/units contract without inferred repository dependencies

Existing guides retain their scopes

Existing material Continue using it for
Scenario v1, electrical v2, local API, reports Canonical input/output and local trust contracts
Canonical case, evidence method, battery notebook Exact guided/base-preset distinctions and independent arithmetic
Tutorial index, course notes, scenario catalog Existing learner progression and scenario explanations
EMT study, power dynamics Separate advanced numerical models and source provenance
Release readiness, v2.0.0 publication decision, v2.0.1 receipt Historical release/rights decisions and Engineering HOLD
External review protocol, reviewer template Attributable independent reproduction, still distinct from maintainer/agent QA
Browser development, dependency validation, native file reader Existing build/runtime/platform gates
Custom-domain deployment, native lesson catalog Their dated publication/source routes, not inferred current deployment
Runtime notices, NOTICE, LICENSE Original and separately licensed material

The current course has 24 lessons; adding one EMT and five dynamics learning items gives 30 discovery items. Eighteen presets and the four-module companion are separate catalogs. Use each model's equations and applied input identity; do not combine the companion's cooling proxy, infrastructure screens and native continuity results as though they were one coupled facility simulation. Source counts and verification limits are qualified in the new reference chapters.

Canonical file: docs/INDEX.md · Back to guide navigation

Image source: Datacenter Twin Lab — project overview

Investigate synthetic datacenter power interruptions with a Python continuity model, explicit battery reserves, and inspectable energy ledgers.

Install and run · Canonical case · Python source · Evidence · Limits


Image source: Datacenter Infrastructure Lab: original vector system illustration

Datacenter Twin Lab combines a deterministic Python continuity engine, a 24-lesson browser course (12 continuity + 12 Infrastructure Engineering), and 18 synthetic scenario presets. One EMT study and five power-dynamics studies are separate learning tracks. The four-module offline dashboard below is a companion, not the full course.

Open the 24-lesson course · Run the guided 1 MW experiment · Inspect verified inputs · Offline four-module companion

The companion's lesson configuration and schema describe that separate dashboard; they are not the source of the 24-lesson course catalog.

Previous animations

Open the previous-animation gallery · Local gallery

Earlier animated artwork, waveform demos, and original interactive experiences are linked alongside the current animations.

Begin with the canonical battery question

  1. Open the guided experiment, then predict how long 100 kWh will supply a fixed 1,000 kW IT load after an outage.
  2. Run the charging-disabled, failed-generator case: 100 kWh × 0.90 × 0.95 = 85.5 kWh delivered, or 307.8 seconds of ride-through.
  3. Compare the prediction with the energy ledger. The outage begins at 300 s elapsed, so battery depletion occurs at 607.8 s elapsed. Check the exact scenario or reproduce it in Python.

The figures are deterministic results of declared synthetic inputs, not facility calibration, certified uptime, or permission to control equipment. For the separate offline companion, open docs/index.html, choose Module 1, change a slider and export the reported configuration.

System topology and model boundaries

Image source: Datacenter ups topology

Conceptual supply topology; no source-specific reliability calculation.

Motion is optional; the vector topology remains readable with reduced motion enabled.

Optional offline companion: four-module learning path

Module Investigation Approximate time
1. Build an electrical load ledger Distinguish IT power from facility overhead and from stored energy. 12 min
2. Scale the population while holding efficiency Identify which outputs scale with server count and which are ratios. 15 min
3. Stress an ambient and efficiency assumption Quantify a cooling-power sensitivity without inventing a reliability result. 15 min
4. Connect the screen to continuity evidence Prepare a bounded infrastructure comparison and choose the native follow-up study. 18 min

Who this is for: Datacenter engineers, infrastructure students, and researchers examining electrical continuity assumptions.

Continue into the implementation

Explore or run the source

Python 3.12+ for the dependency-free native core; the existing React/Vite workspace has its own lockfile and optional API/study dependencies.

python -m pip install .
python -m datacenter_twin simulate --preset generator_failure
python -m unittest discover -s tests -v

These commands come from the audited source revision. Runtime requirements and the project's own validation limits are documented below; the standalone browser lab does not execute these commands.

The detailed project guide below remains the source for installation, supported features, licences, and scientific limits. This presentation change does not alter the Python model, browser calculations, numerical tolerances, or Engineering HOLD.

Project documentation, installation, attribution, and existing validation

Datacenter Twin Lab

A reproducible synthetic continuity laboratory for datacenter power systems.

Start with one battery question

Read the 24 course lessons · Reference results and sources · About the author

How long can a 1 MW IT load ride through a utility outage on 100 kWh of stored battery energy?

In the five-minute walkthrough, predict the battery's ride-through, deliberately run the scenario, then explain the result from its energy ledger. The example uses 100 kWh × 0.90 battery-discharge efficiency × 0.95 distribution efficiency = 85.5 kWh delivered to IT. At 1,000 kW, that is 307.8 seconds from the outage, which starts at 300 s elapsed. Battery depletion is therefore recorded at 607.8 s elapsed. Charging is disabled and the generator is failed.

Open the five-minute guided experiment → · Challenge yourself with 50 kWh · Read the exact inputs and equations

Halving the opening reserve to 50 kWh gives 42.75 kWh delivered to IT: 153.9 s from the outage and depletion at 453.9 s elapsed. Ride-through is a duration counted from the 300 s outage boundary; depletion is an elapsed event timestamp.

This is a teaching and research tool for datacenter engineers learning electrical continuity. It is a narrow, synthetic, uncalibrated model—not a production reliability analysis. Detailed model boundaries and validation status are below.

Image: v2.0.1 Image: CI on main Image: Support me on Ko-fi

v2.0.0 — Infrastructure Engineering adds twelve manuscript-derived lessons, 36 assessments, separate educational models and twelve original SVG scenes to the existing guide, twelve continuity lessons, eighteen presets, reports, EMT and five dynamics studies. Publication decision and attribution; engineering HOLD remains. The CI badge follows main; check the exact released commit's results before relying on them. See release readiness.

The three steps

The pictures below are screenshots of the actual guided interface. Their numbered captions name the corresponding action in the walkthrough.

Screenshot 01: predict an outage-relative ride-through and inspect the before, outage, and recovery setup

01 · Predict. Choose the 100 kWh starting example or 50 kWh challenge. Enter seconds from the outage at 300 s—not an elapsed timestamp. No result is shown until you choose Run 1 MW scenario.

Screenshot 02: compare predicted and calculated ride-through, elapsed depletion time, and the energy ledger

02 · Run. The result reports ride-through separately from depletion time, shows the equation, and breaks out requested, served, and unserved IT energy during the outage window.

Screenshot 03: inspect the completed run's source references, assumptions, hash, and reproducible output

03 · Explain. Export the complete JSON run, inspect its inputs and hash, or optionally request a Python comparison. Report and reserve-sensitivity tools are available after the completed result.

Watch the captioned 60-second tour in the evidence hub → · Tour transcript and reproduction notes

Continue with another part of the lab

The current source includes 18 named scenarios, four illustrative facility profiles, 24 lessons, and on-demand reports and sensitivity tools. Ratings, demand, event timing, rates, and efficiencies are explicit synthetic inputs. The roadmap separates capabilities in the release from work still planned or conditional.

Explore faster electrical dynamics

Go beyond the outage timeline with the DC-link EMT lesson: configure an ideal RLC circuit, replay its voltage sag, inspect signed current and compare JavaScript with Python.

The power-dynamics studio adds five configurable Python studies: converter load steps, oscillation modes, a synthetic load spectrum, phase-model versus QSS response, and a modified nine-bus network. Color-coded diagrams, plots and JSON/CSV exports connect every result to its applied inputs. Its scientific runtime loads only when requested.

Read the EMT equations · Study catalog and reproduction commands. These additions are available on the current website and source; historical v1.0.0 assets remain unchanged.

Reproduce the canonical case

The guide follows lesson 3's exact scenario recipe: it starts from the reference-site inputs, then assigns lesson ID/name and source metadata, disables charging, and sets the initial reserve to 100 or 50 kWh. The canonical case records those inputs and derives the results independently. A direct generator_failure preset run happens to produce the same 100 kWh numeric event time because the battery starts full, but its scenario ID, metadata, charging limit, input hash, and run ID are different.

Reproduce the release evidence packet

v2.0.1 was published on 2026-10-26, packaging the later odd-record spectrum correction and clean dashboard staging. Its separate evidence index, patch receipt and hash-pinned quickstart identify the checked source and artifacts. The original release recipe below remains historical and unchanged.

The historical v2.0.0 release evidence index links the canonical scenario/run JSON, reports, manifest, and receipt. To regenerate and verify the packet from the tagged release source:

git clone https://github.com/mohammadrezwankhan/datacenter-twin-lab.git
cd datacenter-twin-lab
git checkout v2.0.0
python scripts/build_evidence.py --output outputs/evidence --revision "$(git rev-parse HEAD)"
python scripts/build_evidence.py --verify outputs/evidence

The script requires a fresh output directory under outputs/ and prints the manifest digest. For an inspectable checked-in result, use the tracked evidence index and receipt. The checked-in packet has no self-referential commit hash; the release's external evidence manifest records the exact build revision. The v1.0.0 packet remains historical and unchanged.

Also run the original CLI preset

If you want the separate base-preset example, these commands run it directly:

python -m datacenter_twin simulate --preset generator_failure
python -m datacenter_twin simulate --preset generator_failure --format html --output outputs/failure.html
python -m datacenter_twin sweep --preset generator_failure --parameter battery_initial_kwh --values 0 50 100 --format markdown

Choose a new output path if it already exists, or explicitly add --force. The preset allows charging; at 50 kWh it gives 478.2675 s elapsed, rather than the guided lesson's 453.9 s elapsed with charging disabled. The sensitivity guide explains the distinction.

The quickstart installs the published v2.0.1 GitHub wheel with a pinned SHA-256, using uv or Python/pip. It includes the CLI, local dashboard, 24 course lessons, eighteen presets and research evidence, so no Git or Node setup is needed for that route. The distribution is now named datacenter-twin; use a fresh environment when switching from the historical datacenter-twin-lab wheels because both provide the same module and CLI. PyPI publication remains pending. A Python 3.12+ source checkout remains available for development and running the full tests. Earlier release assets retain their original contents.

Checks and evidence

The workflow is configured to test each push to main and each pull request. Its matrix targets Python 3.12 and 3.14 on Windows and Linux; the Playwright Chromium browser journeys run on Ubuntu with Python 3.12. These are per-commit checks, not a blanket claim that every commit or this release has passed. Read the release scope page, evidence packet instructions, and benchmark method for what is measured and how to reproduce it.

The project uses deterministic quantities, unit-labelled outputs, explicit unknowns, stable input hashes, event logs, and energy ledgers. CI and local reproductions establish software behavior for these synthetic fixtures; they do not establish engineering performance or physical accuracy.

For local verification, start with the contributor setup: create an isolated Python environment, install the locked API and frontend dependencies, build the dashboard, and run the core tests and CLI smoke check.

Then follow Rebuild and verify for the browser demo. That workflow installs the scientific dependencies, fetches the hash-checked runtime wheels before preparing the browser assets, runs the engine comparisons, and installs Chromium before the browser journeys. Run both workflows from the repository root and keep TWIN_PYTHON set to the same environment throughout.

Browser and wheel verification details are in the quickstart. The adding-a-scenario guide describes how to propose a small, independently checkable case. No test, benchmark run, automated audit, or maintainer-produced evidence packet counts as an independent external review.

Support and project references

Start with contribution guidance, beginner contribution ideas, support, or the roadmap. Participants follow the Code of Conduct. Use GitHub Discussions to share a reproducible result or review.

If you find this project useful, you can support continued open development on Ko-fi:

Image: Support me on Ko-fi

For a task-based comparison with OpenDC and PyPSA, see Choosing a simulator.

Assumptions and limits

This is a deterministic, local-first teaching simulator for one aggregate IT load. The current model covers synthetic utility and generator availability, finite stored energy, conversion losses, distribution-path limits, shared-domain events, deterministic recovery, replay, and exact energy accounting. The 50 MW example scales electrical demand and battery energy; it does not predict GPU throughput, grid adequacy, equipment selection, or measured site behavior.

The model does not establish facility calibration, protection coordination, AC transients, cooling behavior, workload queues or throughput, generator ramp/cooldown/fuel dynamics, transfer and switching transients, impedance-based load sharing, harmonics, short-circuit or arc-flash studies, reliability probabilities, Tier or service-level claims, certification, physical controls, or physical safety. No facility measurements or validation dataset were used.

You can use it to Model boundary
Compare synthetic utility, generator, battery, and path failures Assumed ratings and efficiencies; no facility calibration
Reproduce event times, energy ledgers, and sensitivity reports Electrical continuity only; no AC transients, protection, cooling, or workload prediction
Learn, inspect, and share a calculation locally No physical controls, certified uptime, or facility safety assessment

The 1 MW reference fixture uses 1,000 kW IT demand, 1,800 s duration, 0.95 distribution efficiency, 100 kWh initial and maximum battery energy, 0.90 discharge efficiency, a 30 s generator start delay, 700 kW path capacities, and a fictional USD 0.10/kWh tariff. The 50 MW case scales demand and battery energy to 50,000 kW and 5,000 kWh while preserving those ratios. These are synthetic inputs, not selected-equipment ratings, live prices, a benchmark, a certification, legal-compliance evidence, or real-site calibration.

Schema-1 PUE and energy planning is separate from schema-2 electrical topology; neither model silently infers the other. Unknown costs and unavailable quantities remain explicit. The dated NVIDIA/model/AWS/Azure/OCI identifiers and one dated Azure East US retail meter are source-backed assumptions, not live feeds, account quotes, capacity allocations, or performance equivalence. Germany, Virginia, and India references are screening pointers, not complete jurisdiction packs or legal advice; India screening must consider the CEA's listed 2026 amendment.

The browser demo has no shared simulation backend or client analytics; its optional Python comparison loads on request. The API binds to loopback. No account, GPU, cloud resource, physical control, shared deployment, database, login, tenant isolation, persistent audit, FAT/SAT, or facility telemetry is introduced. Cooling, workload throughput, calibrated alarms, live telemetry, and predictive models remain planned or unvalidated. A 5,000-star aspiration has no validated timeline and is not evidence of model accuracy or adoption.

Local and CI checks cover the core/API suite, frontend format/type/build, installed-wheel verification, local dashboard journeys, browser/Python journeys, and browser/native equality for synthetic presets. Reference-case timing measures software execution on one local machine; it does not establish scale targets or physical accuracy. These checks are not an independent external review or formal security audit. See the external review protocol for the requested independent reconstruction.

The public source tree excludes private manuals, planning references, and private repository history. Do not add private manuals, extracted private text, credentials, customer traces, or licensed standards text.

Original code and synthetic fixtures use Apache-2.0. See NOTICE, synthetic provenance, and browser runtime licenses. SOURCE-MANIFEST.json identifies the original v0.2.0a0 snapshot, not later versions. Citation metadata accompanies the project; cite the exact release or commit used.

Earlier alpha and candidate assets remain historical and unchanged. Version 2.0.0 is the owner-selected product milestone; planning schema 1, electrical schema 2 and historical releases are preserved. Independent external reproduction remains outstanding; no facility validation, award or outside endorsement is claimed.

Reference handbook — source review of 19 November 2026

The documentation index and readable reference handbook connect the existing tutorials to implementation, equations, interfaces, worked examples, verification evidence, maintenance and recovery. The reviewed source is d8dc3773830a397409a7a9c00a6ffed33c46fb4b; the software citation remains version 2.0.1. This documentation addition does not announce a new software release.

Start with setup and reproducibility, worked labs, or the equation derivations. The dated verification ledger separates executed local checks, historical exact-source CI, unexecuted browser/build checks and pending integration. The twelve-month plan is a set of proposals with acceptance criteria, not a release commitment.

The offline companion, aggregate continuity engine, infrastructure screens, EMT circuit and power-dynamics studies retain their separate assumptions. In particular, a zero internal energy residual, a passing software comparison or an Engineering HOLD decision is not a facility measurement or independent engineering approval.

Canonical file: README.md · Back to guide navigation

Contributing

Datacenter Twin Lab helps datacenter engineers learn power continuity through deterministic, synthetic aggregate-load scenarios. Contributions should make a first run easier to follow, a result easier to inspect, or a bounded behavior easier to reproduce and review.

Good first contributions

You can help without deriving a new electrical edge case:

  • Fix unclear wording, a broken link, a misleading label, or a step that no longer matches the browser journey.
  • Follow the first-run quickstart, then report one confusing step with the page, control, expected wording, and observed wording.
  • Check keyboard navigation, focus order, contrast, readable units, and event-table labels in the browser demo; record the browser and a reproducible observation.
  • Make a small implementation change with a focused test and explain the user-visible result.
  • Improve a scenario page, glossary entry, diagram, or first-run instruction without changing model semantics.
  • Correct a dated primary-source citation while preserving the source date, identifier, and uncertainty.

Browse the scenario catalog, beginner contribution ideas, and course notes before opening a feature proposal. Keep a proposed change to one bounded subsystem and explain the user outcome in the issue or pull request.

Numerical review is welcome when you can state the independent equation, units, and expected result. It is an optional deeper path for numerical bugs and new scenario behavior; a text, link, keyboard, or readability contribution can use the focused checks below.

Before opening a pull request

For a documentation-only change, check relative links, code blocks, Mermaid fences, and caveat wording. Follow the first-run browser route when the copy describes a control. A wording or link correction can use the hosted course; it does not require installing Python or Node. Do not include generated output files, private manuals, licensed standards text, credentials, customer traces, or internal planning/history.

For Python or dashboard changes, start from a checkout of your fork with Python 3.12 or later, Node 24, and npm available. Run the following commands from the repository root, where pyproject.toml lives. The environment's Python is called directly, so no activation script is needed.

Windows / PowerShell:

python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements-api.lock
$env:TWIN_PYTHON = (Resolve-Path .\.venv\Scripts\python.exe).Path
npm.cmd --prefix apps/web ci --ignore-scripts
npm.cmd --prefix apps/web run build
.\.venv\Scripts\python.exe -m unittest discover -s tests -v
.\.venv\Scripts\python.exe -m datacenter_twin simulate --preset generator_failure --format markdown

macOS / Linux:

python3 -m venv .venv
.venv/bin/python -m pip install -r requirements-api.lock
export TWIN_PYTHON="$PWD/.venv/bin/python"
npm --prefix apps/web ci --ignore-scripts
npm --prefix apps/web run build
.venv/bin/python -m unittest discover -s tests -v
.venv/bin/python -m datacenter_twin simulate --preset generator_failure --format markdown

requirements-api.lock installs the API and HTTP test dependencies used by CI; the numerical core itself uses only the Python standard library. When updating an API dependency, follow the selective API-lock refresh and validation workflow. npm ci installs the locked frontend tools before the type check and dashboard build. Use the environment's Python for later CLI runs and tests. TWIN_PYTHON also selects it for browser test helpers and the native build-asset reader. The final command is a first-run smoke check using an existing synthetic case.

For browser calculation or interaction changes, continue with the browser development and parity checks. That workflow prepares the synthetic fixtures before the engine checks and exercises the browser results against Python; keep TWIN_PYTHON set to the environment above.

For a numerical or scenario change, also run the affected preset and record the command, input hash, expected values, observed values, units, and whether the result is synthetic. A changed snapshot alone is not an independent derivation. Keep unknown costs and unavailable values explicit.

On local Windows sessions without symlink creation privileges, three native-reader fixture cases report explicit skips. The remaining reader checks still run; GitHub Actions requires these symlink cases and fails if the capability is missing. See the native-reader regression proof.

Model and scope rules

The current model covers one synthetic aggregate IT load, topology, finite stored energy, generator delay/failure, conversion losses, path limits, shared-domain events, and deterministic replay. The browser AI-cluster teaching case scales the synthetic demand to 50,000 kW and initial battery energy to 5,000 kWh while preserving the fixture ratios. It does not establish facility calibration, protection coordination, AC transients, cooling behavior, workload throughput, certification, uptime, grid adequacy, GPU performance, or physical safety. Do not add physical-control instructions or imply that a test is an equipment validation.

New calculations need explicit units, deterministic behavior or a documented source of nondeterminism, provenance for third-party data, and at least one independently stated expected result. Keep schema-1 planning/PUE inputs separate from schema-2 electrical topology; neither model may silently infer the other.

Pull requests

Use the pull-request template. Describe the user-visible result, files changed, checks run, assumptions, and any open limitation. Small focused changes are easier to verify. Preserve third-party notices and Apache-2.0 licensing terms.

For confidential security concerns, follow SECURITY.md. Do not put credentials, private source material, or customer data in a public issue or pull request. For normal questions and reproducibility help, use GitHub Discussions or open a focused issue.

Assumptions and limits

The synthetic 1 MW fixture uses 1,000 kW IT demand, 1,800 s duration, 0.95 distribution efficiency, 100 kWh initial and maximum battery energy, 0.90 discharge efficiency, 700 kW path capacities, a 30 s generator start delay, and a fictional USD 0.10/kWh tariff. The 50 MW AI-cluster teaching case uses 50,000 kW and 5,000 kWh with the same ratios. These values are assumptions, not selected equipment ratings, live prices, a benchmark, a certification, legal-compliance evidence, or a real-site calibration.

The model excludes cooling transients, workload queues and throughput, battery aging, temperature, generator ramp/cooldown/fuel dynamics, transfer and switching transients, AC load flow, impedance-based load sharing, protection coordination, harmonics, short-circuit and arc-flash studies, reliability probabilities, Tier claims, service-level claims, physical controls, and facility safety assessment. Unknown costs, unavailable quantities, and missing data must remain explicit.

The browser demo has no shared simulation backend or client analytics. The API binds to loopback. No shared service, database, login, tenant isolation, persistent audit, facility telemetry, FAT/SAT, independent external review, formal security audit, or calibration dataset is supplied by this release. The browser's exact JavaScript default and optional on-demand Python verification are software behaviors to be checked by the current release evidence; neither establishes physical accuracy. Review the reproducibility capsule and review protocol before making a numerical claim.

The public source tree excludes private manuals, planning references and the private repository history. Original code and synthetic fixtures use Apache-2.0; preserve NOTICE and the browser runtime licenses.

Maintaining the reference package

Use the documentation index to find the canonical guide before adding another explanation. The new reference chapters cross-link the existing contracts and tutorials; they do not replace their release history. Follow the documentation maintenance runbook for changed equations, interface contracts, rendered HTML and evidence dates.

Before dependency installation, run the repository's offline gate:

python scripts/check_dependency_versions.py --lock-only api test-api studies

After installing the corresponding locks, run the installed-version check with the same Python interpreter. A passing lock check only compares declared files; it does not prove that an environment contains those versions. Keep source-test results, candidate documentation validation, PR checks, merge identity and deployment identity separate. See setup and the CI playbook.

For a source claim, cite an immutable commit and useful line range. For a numerical claim, include the model family, inputs, units, sign convention, expected arithmetic, observed result and tolerance. Preserve the distinction between the charging-enabled CLI preset and the charging-disabled guided lesson. A changed draft is not a completed run; a decorative scene is not measured telemetry. Keep uncertainty, explicit null values and Engineering HOLD visible.

The documentation author checks links, source preservation, the declared CFF schema and handbook regeneration. A separate reviewer evaluates the frozen candidate and its complete diff. Neither author checks nor agent review satisfy the project's existing goal of independent external scientific reproduction.

Canonical file: CONTRIBUTING.md · Back to guide navigation

Changelog

Unreleased — Source metadata and responsive quality guards (2026-11-09)

  • Correct fallback local-dashboard JSON-LD to describe 24 lessons (12 continuity and 12 Infrastructure Engineering) and the current 2.0.1 engine, rather than 12 lessons and 1.0.0.
  • Remove unsupported ATS/generator-synchronization and threshold claims from legacy fallback structured data; retain the bounded DC-equivalent R-L-C and synthetic continuity descriptions.
  • Clarify the flagship 24-lesson course versus the independent four-module offline dashboard in the repository landing documentation.
  • Extend the existing Playwright viewport gate to 1024 × 768, 768 × 1024, 390 × 844 and 360 × 800, retaining previously covered device profiles.
  • Preserve the numerical core, fixtures, API security policy, historical releases and Engineering HOLD without changes.

2.0.1 — Numerical and packaging maintenance

  • Package the existing odd-length one-sided spectrum correction, including the saved 30 Hz / 0.05 pu case and scalar-DFT regression.
  • Include current native-dashboard files only; verify the complete wheel inventory and file hashes before installation.
  • Retain the short-path Windows installation guidance, 24 lessons, EMT and five dynamics studies, eighteen presets and existing public contracts.
  • Add a separate 2.0.1 evidence packet. Versioned run IDs change; unchanged canonical numerical fields and scenario input hashes remain equal. Historical assets and evidence remain untouched.
  • Keep versioned source/archive navigation separate from the published-releases list and audit the current evidence packet.

Published v2.0.1 on 2026-10-26 from 513ddc7150027f5e274a8d50d5edcd3c31167a5e. See maintenance release scope and receipt. Historical assets remain unchanged.

2.0.0 — Infrastructure Engineering

  • Extend the course to 24 lessons with the twelve supplied infrastructure adaptations, 36 assessments, chapter/page attribution and twelve no-JavaScript reading notes.
  • Add distinct lazy SVG scenes, accessible narrative controls, static tables and a separately labelled thermal-time preview.
  • Add typed educational models with applied-input snapshots, units, assumptions, model/content versions and canonical hashes. Generator capacity and fuel use separate screens; failed source claims and the engineering HOLD remain visible.
  • Preserve the twelve original lessons, eighteen presets, four facility profiles, EMT studio, five power-dynamics studies, existing reports and worksheets. Planning schema 1, electrical schema 2, canonical scenario inputs and arithmetic remain unchanged.
  • Advance current package metadata and add a separate 2.0.0 continuity evidence packet; historical releases and evidence are retained.

The owner approved educational publication and attribution. These bounded screens do not certify equipment, an installation or design release. See the publication decision and release scope.

1.0.0 — the complete power-continuity teaching lab

  • Package the guided 1 MW experiment, twelve interactive lessons, eighteen presets, visual demand editor, scenario imports, reports, comparisons and printable worksheets as a full teaching-software release.
  • Add twelve searchable lesson notes, a course index and an author/evidence page with no-JavaScript worked answers, accessible layouts, canonical URLs, structured data, social previews and a sitemap.
  • Support the same static browser bundle at a domain root and a repository subpath, including optional Python verification and evidence links.
  • Preserve numerical algorithms and preset inputs from 0.4.0rc3. Version-derived run identifiers advance; input hashes and calculated values remain unchanged.
  • Publish a new versioned evidence packet, installable wheel, source archive and tested static browser bundle with checksums. Earlier candidates and their measurements remain historical and unchanged.

The owner selected v1.0.0 for the bounded teaching application. Independent external reproduction remains outstanding; software release status does not establish facility calibration, operational safety, certified uptime or external endorsement. See release scope and compatibility.

0.4.0rc3 — save, teach and compare experiments

  • Reopen electrical scenario JSON and browser/CLI run exports with an assumption preview and current-engine recalculation. Invalid or cancelled inputs preserve the completed experiment.
  • Export standalone worksheets for all twelve lessons, preserving the submitted prediction, completed inputs, worked answer, graph and reproduction record on separate printed pages.
  • Compose explicit demand schedules with the visual editor, exact decimal fields, keyboard sliders and requested-energy preview; retain the original failures and recovery events.
  • Include the three 375 kWh timing cases, original vector figure and standard-library reproduction script in the source archive.
  • Preserve meaningful prediction-feedback signs and display precision. Package these source improvements in the downloadable wheel and browser archive.
  • Advance version-derived run identifiers and regenerate the canonical evidence packet. Numerical algorithms and the eighteen preset inputs are unchanged; earlier candidate/alpha assets and benchmark observations remain intact.

This is a candidate for reproducible teaching and review, not a stable release, independent validation or facility reliability claim.

0.4.0rc2 — Windows evidence installation fix

  • Include the correction for serving bundled reports from deeply nested Windows installations. No operating-system settings change; requests outside the dashboard directory remain rejected.
  • Update the installation entry points to the new candidate wheel with its SHA-256 and retain the earlier candidate's shorter-path workaround.
  • Regenerate the three canonical evidence cases for the new version. Numerical algorithms, inputs and results are unchanged; engine version and deterministic run identifiers advance to 0.4.0rc2.

Earlier candidate and alpha tags, assets, evidence and measurement records remain unchanged. This candidate does not establish independent external reproduction or stable maturity.

0.4.0rc1 — a result you can reproduce

This release candidate brings the current browser experience and its proof material into one versioned artifact. It is a candidate for external reproduction, not a claim of independent review or facility reliability.

  • Start with a guided 1 MW experiment: predict ride-through, run the charging-disabled 100/50 kWh cases, and explain depletion with an equation and event states.
  • Keep the full facility simulator in advanced mode and the twelve themed lessons in the course.
  • Inspect three canonical outputs, independently reconstructed energy ledgers, content hashes and a reviewer worksheet in one evidence packet.
  • Compare reserve, generator delay and distribution capacity while preserving the completed run and its assumptions.
  • Use a captioned demonstration, keyboard navigation, explicit source-control names and automated accessibility checks.
  • Reproduce environment-specific engine timing and browser entry measurements using the included tools. Timings are observations, not equipment response claims.

The numerical continuity and planning algorithms are unchanged. The guided inputs disable charging, as lesson 3 already does; the original generator_failure preset continues to allow charging. Versioned output identifiers change with the software version. Earlier alpha tags and release assets remain available as historical artifacts.

See research evidence, the canonical case, and release readiness for the scope and reproduction route.

0.3.0a0 — browser Python and reproducible reports

Published 9 September 2026. Added the static Python browser demo, bounded sensitivity sweeps, Markdown/HTML reports and a reproducibility capsule. Later source changes added the JavaScript first-result path, course and facility workspace; those later changes were not retroactively added to this tag.

0.2.0a0 — synthetic continuity alpha

Published 8 September 2026. Initial clean public companion with the deterministic continuity engine, synthetic scenarios, local API and dashboard.

Unreleased documentation review — 2026-11-19

Added a source-linked reference package for developer setup/interfaces/labs, implemented equations and units, verification scope, maintenance, owner recovery and a proposed twelve-month roadmap. Added a generated static reference handbook and a narrow link from the existing offline companion. The source reviewed is d8dc3773830a397409a7a9c00a6ffed33c46fb4b.

The existing release history, software version 2.0.1, citation, security policy, licenses, application/scientific implementations, fixtures, tests, dependencies and workflows are preserved. Local source checks and their limitations are recorded in the verification ledger; later candidate CI, merge and publication require separate receipts. No new tag, package release or deployment is announced by this entry.

Canonical file: CHANGELOG.md · Back to guide navigation

Citation metadata

Existing CFF, preserved verbatim:

cff-version: 1.2.0
message: "If you use this synthetic research software, cite this repository and the exact commit or release used."
type: software
title: "Datacenter Twin Lab"
authors:
  - family-names: Khan
    given-names: Mohammad Rezwan
version: 2.0.1
date-released: 2026-10-26
repository-code: "https://github.com/mohammadrezwankhan/datacenter-twin-lab"
license: Apache-2.0
abstract: >-
  Synthetic electrical-continuity and energy-planning research software with
  a deterministic Python engine, local API, dashboard and bounded educational
  Infrastructure Engineering screens. Not calibrated to
  a real facility. Third-party references retain their separate rights notices.
keywords:
  - data center
  - electrical continuity
  - synthetic simulation
  - energy planning
  - Python

Canonical file: CITATION.cff · Back to guide navigation

Security

The CLI reads local JSON and writes local JSON. Its optional serve command runs a stateless API and bundled dashboard, bound by the CLI to 127.0.0.1 only. The calculation core has no network access, cloud connector, credential requirement, database or physical-actuation route. Inputs must be regular files of at most 4 MiB; the API applies the same size limit to streamed request bodies. Malformed encoding, duplicate fields and excessive nesting produce input errors.

Outputs preserve existing files unless --force is supplied. Direct paths, symbolic links and hard links to the input are protected; symbolic-link output paths are rejected. A complete temporary result is flushed before publication. Normal creation uses an atomic hard link and fails if another writer has claimed the destination; forced replacement uses os.replace. Unsupported filesystems return an error instead of falling back to truncating writes. This is local file protection, not a guarantee against a privileged attacker changing parent directories or power loss on every filesystem.

The API validates loopback Host headers, limits CORS to the documented local Vite origins, serves a same-origin content policy and disables API caching. Two continuity requests execute concurrently, and additional requests wait. These are local application boundaries; they do not supply user authentication, multi-tenant isolation or abuse-resistant scheduling. Calculation POSTs do not persist data. The catalogue is bundled, and the backend does not fetch user URLs or provider services. Browser evidence links navigate only when selected by the user.

Shared deployments, authentication, authorization, persistence, tenant isolation and telemetry ingestion remain outside this version. Importing the app into a differently bound ASGI server changes its trust boundary; do not expose that configuration without designing and testing those controls. No physical equipment interface is present. See local API for the supported routes and input envelope.

Report a suspected vulnerability privately to the repository owner through an available private GitHub channel. Avoid including secrets or exploitable customer details in an issue. No security certification or penetration-test claim is made.

Canonical file: SECURITY.md · Back to guide navigation

Roadmap

Published maintenance release: v2.0.1

The v2.0.1 maintenance release was published on 26 October 2026. Its scope and publication receipt record the checked numerical and packaging fixes. It adds no new model or public schema and preserves the original v2.0.0 release assets and historical milestone.

Published milestone: v2.0.0 — Infrastructure Engineering

Version 2.0.0 extends the teaching application with twelve Infrastructure Engineering lessons alongside twelve continuity lessons, one EMT lesson and five power-dynamics studies. The current Learn catalog contains these 30 learning items; eighteen advanced facility presets are a separate catalog. It does not claim production reliability analysis, site validation, or independent review. Infrastructure content retains its source labels and Engineering HOLD. Review the supported release scope in release readiness and the educational publication decision.

Available in the current source and browser demo

Capability What is available
Five-minute guided start Default first-visit route: predict, explicitly run, and explain a 1 MW / 100 kWh synthetic case. Compare the charging-disabled 50 kWh challenge.
Scenario catalog Eighteen named cases, including five reference cases and facility-profile outage, demand-step, and extended-reserve cases for 50 MW, 200 MW, 30 MW, and 5 MW aggregate IT loads. All inputs are synthetic.
Advanced energy workspace Inspect an interactive isometric electrical scene, run and replay events, edit bounded assumptions, and export the completed result.
Twelve continuity lessons Four course chapters with predictions, challenge values, selectable scenes, event replay, worked answers, and result exports.
Twelve infrastructure lessons Bounded educational screens, original diagrams, 36 assessments and separate infrastructure-screen-1 results. Source statement, Editorial derivation, Illustrative assumption and Unresolved labels remain visible.
EMT and power dynamics One DC-link RLC lesson and five separate converter/network studies. Their model assumptions and reproduction routes are distinct from the aggregate continuity engine.
Deterministic calculation Standard-library Python engine and exact JavaScript browser engine, with a Python comparison available on request. Full-result checks cover values, assumptions, and hashes.
Reports and sensitivity Export JSON, Markdown, and HTML; compare bounded reserve, efficiency, demand, and delay cases. Unknown values remain explicit.
Evidence and contribution material Reproducibility packet, independent-review protocol, source register, tutorials, notebook, scenario guidance, and contribution ideas.
Local use CLI and loopback dashboard. The browser demo runs its first result locally and has no shared simulation backend or client analytics.

Open the guided experiment, the advanced workspace, the 50 MW outage case, or the course and study catalog. The evidence hub and tutorial index provide the supporting material. The Python quickstart pins the published v2.0.1 wheel with its SHA-256 checksum. The current website and main can include later maintenance; the tagged release assets remain unchanged.

Current source and the browser demo also reopen scenario JSON and electrical run exports: validate inputs, preview changed assumptions, calculate a fresh result and compare it with Python. This workflow was included in 1.0.0 and is retained in 2.0.0; earlier release assets remain unchanged.

The twelve continuity lessons also export a printable worksheet with a submitted prediction, completed inputs, worked calculation, graph and reproducibility record. The standalone HTML keeps the prediction and answer on separate printed pages. The 2.0.0 release retains this legacy worksheet workflow; infrastructure screens use their separate report format.

The advanced workspace also includes a visual demand timeline: add, select, move and remove explicit load steps, preview requested energy, then run the schedule through the existing engine. Failures and recovery events are preserved. The 2.0.0 release retains the editor and the equal-energy timing tutorial; historical release assets remain unchanged.

Next product decisions

Use reproducible first-run problems and learner feedback to prioritize the next capability. The guide, course, timeline editor and exports are available for evaluation; their delivery does not establish teaching effectiveness or independent use. Prioritize further changes using concrete reproduction or usability feedback.

Release evidence and external review

The v2.0.0 software milestone retains the guide, continuity course, eighteen presets, reports, scenario imports and visual demand editor, and adds Infrastructure Engineering while preserving the later EMT/dynamics models. Release artifacts must pass the exact-source Python, browser, installed-package and hash checks described in release readiness. The v1.0.0 milestone and historical candidate assets remain unchanged.

Independent external reproduction remains an open evidence goal. Use the existing review discussion and protocol, preserve reviewer attribution and scope, and resolve any reproduced mismatch. Maintainer or agent QA cannot satisfy that goal. Software versioning does not imply facility validation.

Calibrated facility examples are conditional on data rights, measurement provenance, uncertainty, a named validation owner, and an agreed acceptance boundary. None is included today. A DOI or archive citation is conditional on a stable artifact, approved deposit metadata, and an authorized archive account; no DOI or archive endorsement is available to cite now.

Deferred boundaries

The existing isometric workspace and course scenes are teaching views of completed synthetic calculations. No broader 3D scene system or operational controller is promised. Live telemetry, shared multi-user service, cooling/workload prediction, calibrated alarms, protection studies, physical controls, and reliability or certification claims need separate contracts, evidence, security, and acceptance decisions; they are outside this release.

The loopback API remains local. There is no shared deployment, database, login, tenant isolation, persistent audit, facility telemetry, FAT/SAT, or real-time control. Do not use synthetic results as equipment selection, grid-adequacy, facility-safety, legal-compliance, uptime, or service-level evidence.

Outside adoption and repeat demo use remain unknown without voluntary, sourced reports. A 5,000-star aspiration has no validated timeline and is not evidence of accuracy, award readiness, or adoption. Maintainer delivery and CI do not count as outside review or endorsement.

Original code and synthetic fixtures use Apache-2.0; see NOTICE and browser runtime licenses.

Rolling plan: 19 November 2026 to 18 November 2027

This evidence-based plan supplements the preserved release history and current-capability sections above. It is grounded in source d8dc3773830a397409a7a9c00a6ffed33c46fb4b and the dated verification ledger. Every item below is PROPOSED: dates, roles, person-day effort and staffing availability are planning assumptions, not delivered features or release commitments. This documentation run implements none of the proposed application/model changes.

The twelve-calendar-month interval begins 2026-11-19 and ends 2027-11-18. Now/Next/Later/Horizon use three-month windows; they are not mislabeled calendar quarters. Calendar overlap is: partial Q4 2026 (Nov 19–Dec 31), full Q1/Q2/Q3 2027, and partial Q4 2027 (Oct 1–Nov 18).

Phase Proposed window Main outcome
Now 2026-11-19–2027-02-18 Traceable documentation delivery, locked reproduction, interface decision and publisher recovery
Next 2027-02-19–2027-05-18 Outside reproduction, explicit raw-input contract, observed learning journeys and discovery integrity
Later 2027-05-19–2027-08-18 Reproducible distribution, bounded dependency maintenance, successor rehearsal and domain review
Horizon 2027-08-19–2027-11-18 Conditional measured-use/archive decisions and a new plan based on actual evidence

Critical sequencing and shared work

DC-N02 supplies the clean-environment basis for DC-X01/X02/X03 and DC-L01/L02. DC-N04 precedes the independent recovery rehearsal DC-L03. External software reproduction and infrastructure review are separate evidence goals. Conditional model work DC-H03 follows the usability/domain/data decisions; it must not assume those decisions are positive. There is no confirmed runtime dependency on another repository. A portfolio coordinator may reuse review/tooling methods without inventing a cross-repository integration or copying unrelated findings into this public plan.

Now — 2026-11-19 to 2027-02-18

DC-N01 — Close the documentation delivery evidence

Class: documentation. Priority: P0. Suggested owner: Documentation maintainer and authorized integration owner. Effort: 1–3 person-days. Confidence: high. Proposed checkpoint: 2026-11-30. Dependencies: none.

Evidence: .github/workflows/tests.yml; docs/cloudflare-pages-deployment.md; AGENTS.md.

Outcome: Readers can identify exactly which documentation was reviewed and published.

Proposed change: Independently review the frozen package, refresh effective PR policy/checks and bind any actual merge/Pages publication to its content.

Acceptance:

  • All 24 output dispositions and complete tree/interface accounting accepted by independent QA.
  • Current required checks/reviews resolve for the actual candidate; no guard bypass.
  • Record merged/deployed identities and distinctive handbook content, or retain a precise blocked/unverified outcome.

Verification: Independent frozen-candidate review; exact diff/tree; provider records and direct inspection of the existing published reference route.

Risks / unresolved assumptions: Effective protection metadata may remain inaccessible. Custom-domain Direct Upload is distinct from the configured docs-copy route.

DC-N02 — Reproduce the locked acceptance environment

Class: maintenance. Priority: P0. Suggested owner: Test/toolchain maintainer. Effort: 2–4 person-days. Confidence: high. Proposed checkpoint: 2026-12-18. Dependencies: none.

Evidence: scripts/check_dependency_versions.py; requirements-api.lock; requirements-studies.lock; apps/web/package-lock.json; .github/workflows/tests.yml.

Outcome: A clean environment can repeat the intended source checks without conflating optional skips with passes.

Proposed change: Reconstruct declared Python/frontend dependencies and retain a source-bound environment receipt alongside full appropriate checks.

Acceptance:

  • Offline and installed dependency checks pass against unchanged declarations.
  • Run the applicable Python/API/scientific, complete native, type/build and browser gates with original skipped/unavailable records retained.
  • Document actual OS/Python/Node/browser versions and source identity, including any capability-specific skips.

Verification: Clean checkout, exact lock install, original commands and raw provider/local logs with hashes.

Risks / unresolved assumptions: Package/runtime downloads and browser capabilities must be available. Successful author runs on differing NumPy/SciPy versions do not meet this acceptance criterion.

DC-N03 — Resolve the release-gate wrapper inconsistency

Class: defect/contract decision. Priority: P1. Suggested owner: TypeScript contract maintainer and domain reviewer. Effort: 2–4 person-days. Confidence: high. Proposed checkpoint: 2027-01-22. Dependencies: none.

Evidence: apps/web/src/infrastructure/screens.ts; apps/web/src/infrastructure/InfrastructureCourse.tsx; apps/web/tests-engine/infrastructure.test.ts.

Outcome: Callers can clearly distinguish numeric lesson results from six-state review decisions.

Proposed change: Choose a separate typed state-result envelope or an explicitly supported direct-only API; implement only the accepted contract in a separate source change.

Acceptance:

  • A valid six-state direct call remains teaching-screens-satisfied with certification=false.
  • A chosen wrapper contract handles valid state inputs or deliberately rejects them with documented interface typing.
  • All numeric lesson outputs/hashes remain stable; malformed, unknown and mixed state inputs have focused negative tests.

Verification: First preserve the observed failing wrapper case; then run focused interface tests and the existing infrastructure/native suite.

Risks / unresolved assumptions: This is not a demonstrated failure of any current lesson. A broad union type could weaken numeric-input guards if adopted carelessly.

DC-N04 — Make custom-domain publishing recoverable

Class: maintenance. Priority: P1. Suggested owner: Repository owner and publication maintainer. Effort: 2–5 person-days. Confidence: medium. Proposed checkpoint: 2027-02-12. Dependencies: none.

Evidence: docs/cloudflare-pages-deployment.md; apps/web/vite.config.ts; apps/web/site.config.json.

Outcome: An authorized successor can identify and reproduce the real publisher without searching for an undocumented workstation script.

Proposed change: Inventory the out-of-tree publisher/version and secure configuration, then decide which public-safe build/deployment instructions can be versioned.

Acceptance:

  • Identify the actual authorized publisher artifact and exact version/hash.
  • Document public asset selection, build/source identity and Worker route dependencies.
  • Rehearse a dry build/artifact comparison without publishing or exposing credentials.

Verification: Owner-confirmed inventory plus an independently prepared build and byte-level artifact comparison.

Risks / unresolved assumptions: External script/access may be unavailable. Do not replace hosting/DNS or infer credentials to satisfy the plan.

Next — 2027-02-19 to 2027-05-18

DC-X01 — Obtain a scoped outside reproduction

Class: verification. Priority: P1. Suggested owner: Independent external reviewer with maintainer support. Effort: 3–8 person-days. Confidence: medium-low. Proposed checkpoint: 2027-03-31. Dependencies: DC-N02.

Evidence: docs/validation/review-protocol.md; docs/validation/reviewer-receipt-template.md; docs/validation/evidence-method.md.

Outcome: The project gains attributable evidence beyond its own maintainers and agents.

Proposed change: Use the existing protocol for a fresh environment and selected canonical cases, preserving reviewer scope and disagreements.

Acceptance:

  • Reviewer supplies actual environment, exact source and independent expected/observed values.
  • At least the 100/50 kWh charging-disabled cases and path-capacity case are reproduced or discrepancies are reported.
  • Publish only an authorized receipt; status remains not obtained until the real review is complete.

Verification: External signed/attributed report evaluated against the existing review protocol, with raw numerical evidence where permitted.

Risks / unresolved assumptions: Reviewer availability and permission to publish are unknown. Software reproduction does not establish facility validity.

DC-X02 — Decide the raw JSON acceptance contract

Class: engineering improvement. Priority: P1. Suggested owner: API/native-engine maintainer. Effort: 2–5 person-days. Confidence: medium. Proposed checkpoint: 2027-04-16. Dependencies: DC-N02.

Evidence: datacenter_twin/contracts.py; apps/web/src/javascript-worker.ts; apps/web/src/ScenarioFiles.tsx; apps/web/src/worker-envelope.ts.

Outcome: Users get explicit and testable behavior for ambiguous or oversized imported JSON.

Proposed change: Decide whether duplicate-key handling should be aligned across raw entry paths and document file-read versus request-body limits.

Acceptance:

  • A decision lists each Python, worker and file-import boundary and intended duplicate-key/size behavior.
  • If behavior changes, focused positive/negative cases prove it without weakening exact field/number validation.
  • Existing valid 18-preset and bounded edge-case native/Python results stay unchanged.

Verification: Source-located contract decision plus byte-level raw JSON fixtures, native/Python comparisons and targeted import journeys.

Risks / unresolved assumptions: A parser replacement can change numeric normalization or add unjustified dependencies. The current difference is documented; no universal parity claim is assumed.

DC-X03 — Verify the completed-result learning journeys

Class: engineering improvement. Priority: P2. Suggested owner: Frontend maintainer and accessibility reviewer. Effort: 3–7 person-days. Confidence: medium. Proposed checkpoint: 2027-04-30. Dependencies: DC-N02.

Evidence: apps/web/src/GuidedStart.tsx; apps/web/src/ScenarioFiles.tsx; apps/web/src/RunTools.tsx; apps/web/src/emt/Study.tsx; apps/web/src/research/Studio.tsx.

Outcome: Learners can distinguish their draft/prediction from the calculation they export.

Proposed change: Collect bounded, authorized usability observations and run keyboard/reflow journeys across guide, import, reports, EMT and research.

Acceptance:

  • Record browser/version/viewport for at least desktop and narrow-screen journeys.
  • Verify explicit run, dirty draft, stale response, cancellation, export context and keyboard focus in the selected flows.
  • Any reproduced defect gets a focused test and a separate scoped fix; no invented adoption or learning-effectiveness claim.

Verification: Existing Playwright journeys plus a named manual interaction protocol and evidence captures.

Risks / unresolved assumptions: Volunteer observations and device coverage may be limited. Session review progress is not durable learner tracking; no analytics system is implied.

DC-X04 — Protect discovery summaries as the catalog grows

Class: documentation. Priority: P2. Suggested owner: Documentation/discovery maintainer. Effort: 1–3 person-days. Confidence: high. Proposed checkpoint: 2027-05-14. Dependencies: none.

Evidence: apps/web/seo.ts; apps/web/learn-manifest.ts; apps/web/learn-discovery.ts; apps/web/tests-engine/seo-delivery.test.ts.

Outcome: Search/discovery material remains complete enough to find the real lessons while retaining their limits.

Proposed change: Evaluate the deliberate 60 KiB llms-full summary shortcut with actual catalog size and preserve source links/HOLD.

Acceptance:

  • Every declared learning item has a valid reading/runtime mapping.
  • The byte budget is measured and engineering HOLD remains in infrastructure summaries.
  • Retain full prose at canonical routes; alter summary selection only if a measured failure requires it.

Verification: Locked build, source-hash manifest checks, complete SEO delivery tests and measured output bytes.

Risks / unresolved assumptions: Budget pressure may grow with future content. The summary is not represented as the full source manuscript.

Later — 2027-05-19 to 2027-08-18

DC-L01 — Rehearse a source-bound distribution capsule

Class: maintenance. Priority: P1. Suggested owner: Packaging and verification maintainer. Effort: 3–6 person-days. Confidence: medium. Proposed checkpoint: 2027-06-18. Dependencies: DC-N02, DC-X01.

Evidence: scripts/verify_distribution.py; scripts/build_evidence.py; docs/engineering/release-readiness.md; .github/workflows/publish-pypi.yml.

Outcome: A successor can inspect a built distribution and its calculation evidence without relying on a moving branch.

Proposed change: Prepare a reproducible wheel/evidence capsule from a deliberately selected source, without modifying historical assets or publishing a release automatically.

Acceptance:

  • Wheel metadata, included dashboard requirement where applicable and distribution verifier all agree.
  • Retain source, wheel SHA-256 and fresh packet digest; reproduce the installed CLI path.
  • Any actual later publication uses separately authorized existing release controls.

Verification: Clean package build/install, verify_distribution, exact-source CI and fresh evidence reproduction.

Risks / unresolved assumptions: Packaging/build dependencies and platform differences can affect artifacts. A capsule is not a new release until a real release decision occurs.

DC-L02 — Exercise one bounded dependency refresh

Class: maintenance. Priority: P1. Suggested owner: Toolchain and scientific maintainers. Effort: 4–8 person-days. Confidence: medium. Proposed checkpoint: 2027-07-16. Dependencies: DC-N02.

Evidence: pyproject.toml; requirements-studies.lock; apps/web/package.json; datacenter_twin/research/sdcib.py; scripts/fetch_study_runtime.py.

Outcome: Dependency maintenance preserves numerical and browser contracts instead of relying on import success alone.

Proposed change: Select a justified update, revise relevant manifests/locks together and test the declared platform/scientific/browser matrix.

Acceptance:

  • Offline and installed-version checks agree after the selected update.
  • Numerical residual/refinement, raw contract, native/browser, packaging and security gates retain their documented meaning.
  • Scientific wheel identity and internal typing/import compatibility are verified; no tolerance is relaxed to hide a regression.

Verification: Before/after source-bound CI and numerical comparison receipts, plus exact lock diff review.

Risks / unresolved assumptions: Updated solver/toolchain behavior may reveal real incompatibilities. This plan does not prescribe an unverified future version.

DC-L03 — Run an owner-handoff recovery rehearsal

Class: maintenance. Priority: P1. Suggested owner: Successor maintainer with owner oversight. Effort: 2–5 person-days. Confidence: medium. Proposed checkpoint: 2027-08-06. Dependencies: DC-N04, DC-L01.

Evidence: docs/cloudflare-pages-deployment.md; AGENTS.md; docs/engineering/browser-demo.md.

Outcome: Recovery depends on inspectable artifacts and explicit authority rather than one workstation.

Proposed change: Have a different authorized maintainer follow the recovery runbook through source, local app, evidence, docs and publisher dry-build stages.

Acceptance:

  • The successor records exact starting source, environment and missing capabilities.
  • Rebuild and verify the handbook/evidence without rewriting old packets.
  • Record any inaccessible policy/publisher boundary accurately; no credentials are copied into public materials.

Verification: Independent rehearsal receipt and artifact comparison; any live publication remains a separately authorized step.

Risks / unresolved assumptions: Account or environment ownership can require owner intervention. A dry rehearsal does not prove a live deployment occurred.

DC-L04 — Review infrastructure derivations and labels externally

Class: verification. Priority: P2. Suggested owner: Independent domain reviewer and content maintainer. Effort: 5–12 person-days. Confidence: medium-low. Proposed checkpoint: 2027-08-18. Dependencies: DC-X01.

Evidence: apps/web/src/infrastructure/screens.ts; data/infrastructure/golden-cases.json; docs/releases/v2.0.0-publication-decision.md; NOTICE.

Outcome: The teaching material gains an attributable review of equation boundaries, unit conversions and source labels.

Proposed change: Review the eleven lesson model families and selected edge cases while keeping rights and Engineering HOLD explicit.

Acceptance:

  • Each reviewed family identifies implemented equation, units, assumption/source label and a hand-checkable case.
  • Resolve or retain discrepancies with source locators and reviewed limits.
  • The report does not lift Engineering HOLD, grant new rights or claim equipment validation by implication.

Verification: Attributable domain review, independent arithmetic and comparison with existing 24-case/222-value verifier.

Risks / unresolved assumptions: Reviewer expertise and licensed source access are not assumed. A scalar review is narrower than full facility engineering.

Horizon — 2027-08-19 to 2027-11-18

DC-H01 — Decide whether a measured-use study is feasible

Class: exploratory research. Priority: P3. Suggested owner: Data-rights owner and validation lead. Effort: 6–15 person-days. Confidence: low. Proposed checkpoint: 2027-09-30. Dependencies: DC-X01, DC-L04.

Evidence: datacenter_twin/research/grid_network.py; docs/validation/review-protocol.md; NOTICE.

Outcome: Any future measured-use effort begins with a valid evidence contract.

Proposed change: Evaluate available authorized data/originals, unit bases, uncertainty and an agreed use boundary before proposing calibration or domain expansion.

Acceptance:

  • Explicit go/no-go record identifies data permission, provenance, units/bases and validation ownership.
  • A proposed uncertainty/error budget and held-out comparison protocol are reviewable.
  • If inputs remain unavailable, retain the no-go and current synthetic/adapted limits; do not manufacture a trace.

Verification: Rights/provenance review and an independently reviewed validation design, not a fabricated model-accuracy metric.

Risks / unresolved assumptions: Original MATLAB and measured GPU trace are currently absent. Permission, representative data and validation effort may be unavailable.

DC-H02 — Evaluate an archival citation deposit

Class: documentation. Priority: P3. Suggested owner: Repository owner and release maintainer. Effort: 2–5 person-days. Confidence: medium-low. Proposed checkpoint: 2027-10-15. Dependencies: DC-L01.

Evidence: CITATION.cff; docs/engineering/release-readiness.md; NOTICE.

Outcome: A stable artifact could receive a verifiable archival citation if an authorized route exists.

Proposed change: Review artifact identity, metadata and account authority; decide whether a deposit is justified.

Acceptance:

  • Verify the actual artifact/version, author metadata, rights and authorized archive account.
  • If a deposit occurs under separate authorization, record the real returned identifier and resolvable record.
  • Otherwise keep CFF without an invented DOI and record the decision.

Verification: Archive provider record plus artifact checksum/metadata reconciliation; no speculative identifier.

Risks / unresolved assumptions: Archive access/permission and a suitable stable artifact are conditional. A repository version number is not an archive endorsement.

DC-H03 — Select one evidence-supported model improvement

Class: exploratory research. Priority: P3. Suggested owner: Scientific maintainer with independent reviewer. Effort: 8–20 person-days. Confidence: low. Proposed checkpoint: 2027-10-29. Dependencies: DC-X03, DC-L04, DC-H01.

Evidence: datacenter_twin/research/init.py; tests/test_research.py; apps/web/src/infrastructure/screens.ts.

Outcome: Future model work addresses a demonstrated learning or numerical need.

Proposed change: Choose at most one bounded extension or correction from reviewed findings; define equations, accepted domain and verification before implementation.

Acceptance:

  • Decision cites a reproduced need rather than a popularity target.
  • Proposed change has explicit units, signs, initial/boundary conditions, failure behavior and independent acceptance cases.
  • No existing synthetic result is relabelled calibrated; a no-go is acceptable when evidence is insufficient.

Verification: Reviewed design and independent verification plan; any later implementation requires its own source/test review.

Risks / unresolved assumptions: Feasibility depends on prior review/data decisions. Changing the scientific domain can invalidate existing evidence.

DC-H04 — Close the year and roll the evidence plan forward

Class: documentation. Priority: P2. Suggested owner: Repository owner and documentation maintainer. Effort: 1–3 person-days. Confidence: high. Proposed checkpoint: 2027-11-18. Dependencies: DC-N01, DC-X01, DC-L03.

Evidence: ROADMAP.md; docs/validation/review-protocol.md; .github/workflows/tests.yml.

Outcome: The next plan begins from actual delivered/reviewed outcomes.

Proposed change: Reconcile stable roadmap IDs with receipts, open limitations, publication identity and voluntary user feedback.

Acceptance:

  • Every item is completed with evidence, explicitly deferred, blocked or rejected; no item silently disappears.
  • Record independent-review and recovery outcomes separately from code delivery and publication.
  • Publish the next rolling 12-calendar-month proposal with partial-quarter boundaries and no invented adoption/star timeline.

Verification: Owner review of the evidence/roadmap register and exact source/publication snapshots.

Risks / unresolved assumptions: Some conditional items may remain no-go or blocked. Absence of analytics is not evidence of zero or positive adoption.

Evidence required to close an item

Retain the stable ID, exact changed source/artifact, actual execution or review date, acceptance result and unresolved limits. A proposal becomes complete through its acceptance evidence, not by moving its calendar label. Preserve no-go, deferred and blocked outcomes. None of these milestones promises facility calibration, new hosting, a new release, a DOI, certification or a star/adoption target.

Canonical file: ROADMAP.md · Back to guide navigation

Architecture and execution boundaries

This reference describes source d8dc3773830a397409a7a9c00a6ffed33c46fb4b, inspected on 19 November 2026. Datacenter Twin Lab is a local teaching and research system with several deliberately separate numerical models. Begin with the existing electrical-continuity guide for the aggregate model and the model limits before combining results.

The calculation routes

Route Input boundary Calculation Result and delivery
Native planning Schema 1 Scenario, ordered load segments and assumed PUE Decimal arithmetic in engine.py Synthetic demand estimate, energy-only cost and capacity screen; no supply dispatch
Native continuity Schema 2 SiteScenario, validated assets, DAGs and ordered events Exact Fraction network flow and event splitting in continuity.py Completed scenario, interval ledger, event log, warnings and reproducible input hash
Browser continuity Validated JSON request to a fixed JavaScript worker dispatcher The separate BigInt rational implementation under js-engine/ Local result; optional Python/Pyodide comparison is requested separately
Local API JSON request to an app created by create_app() Native Python functions; a two-slot semaphore covers continuity, reports and sweeps Stateless response; the CLI binds the ASGI server to 127.0.0.1
Infrastructure course Numeric lesson inputs and source/evidence metadata Bounded algebraic screens in infrastructure/screens.ts Frozen infrastructure-screen-1 teaching result, units, hashes and explicit verification limits
EMT lesson Ten bounded circuit/configuration fields Native TypeScript RK4; separate standard-library Python implementation Ideal DC-link samples and energy ledger; explicit comparison and step refinement
Dynamics studio One of five study IDs and bounded overrides Separate Python scientific worker using the research package Recomputed equilibria, modal/response data, solver diagnostics and JSON/CSV
Four-module companion Embedded lesson-config.json, selected kind cooling Closed-form JavaScript teaching proxy in docs/index.html 241 synthetic samples and local configuration/CSV export; separate from the course and continuity model

Implementation: datacenter_twin/engine.py, datacenter_twin/continuity.py, datacenter_twin/api.py, apps/web/src/javascript-worker.ts, apps/web/src/infrastructure/screens.ts, apps/web/src/emt/engine.ts, apps/web/src/research/runtime-worker.ts, docs/index.html:242–346.

How a continuity result is formed

  1. Parse bounded input and reject missing/unknown fields, invalid domains and incompatible topology. Schema 1 and schema 2 are independent contracts.
  2. Normalize the accepted scenario for deterministic JSON and SHA-256 identity. An engine version plus input digest identifies a run; a CLI export timestamp sits outside the deterministic result.
  3. Apply same-time events in their declared order. Compute availability and generator readiness from the utility asset state. Build the residual network with node/path capacity limits and dispatch utility, generator and battery in that order.
  4. End an interval at the earliest regular step, external event, generator-ready boundary, exact battery depletion/full boundary or simulation end. Accumulate exact energy terms before decimal serialization.
  5. Return a completed run. Reports re-evaluate validated inputs; result exports, charts and replay consume completed results rather than advancing a physical controller.

See datacenter_twin/contracts.py, datacenter_twin/topology.py, datacenter_twin/continuity.py:308–364, datacenter_twin/continuity.py:522–548, datacenter_twin/browser.py:20–35 and the derivations.

Browser state and worker ownership

The React application keeps draft inputs separate from completed runs. Editing a field marks the current result as stale for that draft; explicit calculation replaces the completed result. Imported scenario/run JSON is revalidated and recalculated rather than trusted as an authoritative result. The demand editor preserves availability events and their equal-time ordering. Course review progress is session state, not a durable learning record. apps/web/src/App.tsx, apps/web/src/ScenarioFiles.tsx, apps/web/src/demand-timeline.ts, apps/web/src/visit-reviews.tsx.

Worker request IDs correlate responses and a fixed envelope restricts fields and body size. A 90-second timeout terminates the shared worker and rejects pending requests. Aborting one request terminates the worker only when no requests remain. A queued worker operation is not evidence of browser parallel computation. Runtime download progress reports observed bytes; compressed or unknown totals are not fabricated percentages. apps/web/src/worker-envelope.ts, apps/web/src/worker-request.ts, apps/web/src/runtime-progress.ts.

The ordinary JavaScript worker supports continuity/planning/report/catalog operations. EMT imports its own native module; Python dispatch_json additionally exposes emt. Research uses a separate research worker request and scientific archives. The local HTTP API has no EMT or research REST route. datacenter_twin/browser.py:38–69, apps/web/src/javascript-worker.ts, apps/web/src/emt/Study.tsx:147–275, apps/web/src/research/runtime-worker.ts.

Repository map

Area Responsibility Change boundary
datacenter_twin/ Native contracts, models, reports, CLI and optional API Application/scientific changes require their own focused tests and review
datacenter_twin/research/ Adapted supplied equations and guarded study wrappers Preserve provenance and distinguish missing original MATLAB/measurement inputs
apps/web/src/ Course state, worker adapters, native model mirrors, charts and teaching scenes Preserve result/draft boundaries and Python comparison contracts
apps/web/ build modules Static lesson discovery, metadata, security headers and local evidence staging Root/subpath URLs, source hashes and public-asset allowlists matter
data/ Synthetic fixtures, catalog assumptions and historical evidence Dates and unknowns remain explicit; historical packets stay immutable
docs/ Existing contracts/tutorials, offline companion and this reference package Static documentation is copied by the existing Pages pipeline
assets/engineering-hero/ Original decorative presentation plus separately licensed vendor files Animation is not model evidence or a physical result
scripts/, tests/, .github/ Reproduction, build, platform and security checks Preserve check names, tolerances, supported matrix and deployment guards

Publication is a separate system

The Vite application writes a local dashboard bundle or a static demo. The existing tests.yml pipeline builds legacy Pages entry points and then copies docs/ over the output, preserving the offline companion. This handbook is a committed static document under that copied tree. The custom-domain course uses a documented Cloudflare Direct Upload route with an external publisher script; merging repository docs does not by itself establish a custom-domain deployment. apps/web/vite.config.ts:113–151, scripts/build_pages_redirect.py, .github/workflows/tests.yml:200–219, docs/cloudflare-pages-deployment.md. Follow the release playbook to verify the actual deployed artifact and distinctive new content.

Canonical file: docs/developer/ARCHITECTURE.md · Back to guide navigation

Setup and reproducibility

Use a new checkout and isolated environment. The commands below are rooted at the directory containing pyproject.toml. For the published wheel and its recorded SHA-256, retain the existing quickstart; the source procedure here reproduces the inspected commit, not an unspecified moving branch.

git clone https://github.com/mohammadrezwankhan/datacenter-twin-lab.git
cd datacenter-twin-lab
git checkout d8dc3773830a397409a7a9c00a6ffed33c46fb4b
git rev-parse HEAD
python3 -m venv .venv
.venv/bin/python -m datacenter_twin simulate --preset generator_failure

The last command works from the source root without installing optional dependencies. Python 3.12+ is declared; current source CI targets 3.12 and 3.14 on Linux/Windows and includes a macOS native-reader check. These targets are not a claim that every possible interpreter/platform combination was executed locally. pyproject.toml, .github/workflows/tests.yml.

Dependency-free core

.venv/bin/python -m unittest discover -s tests -v
.venv/bin/python -m datacenter_twin run data/scenarios/baseline-1mw.json
.venv/bin/python -m datacenter_twin simulate --preset generator_failure --format markdown
.venv/bin/python -m datacenter_twin.emt --preset voltage-sag

On 19 November 2026 the isolated standard-library run discovered 306 tests, executed 247 successfully, and explicitly skipped 59 requiring optional API/scientific packages. An OK (skipped=59) summary is not 306 executed passes. The verification ledger records this run separately from later scientific checks. Use the test modules linked in that ledger for the precise scope.

Locked API and scientific environment

Check the manifests before any dependency download, then install the corresponding locks and verify installed versions with the same interpreter:

.venv/bin/python scripts/check_dependency_versions.py --lock-only api test-api studies
.venv/bin/python -m pip install -r requirements-api.lock
.venv/bin/python -m pip install -r requirements-studies.lock
.venv/bin/python scripts/check_dependency_versions.py api test-api studies
export TWIN_PYTHON="$PWD/.venv/bin/python"
.venv/bin/python -m unittest discover -s tests -v

The offline check compares lock contents to declared extras. The installed check inspects distributions and fails on the first mismatch; do not silently replace exact pins with whichever versions are preinstalled. The audit environment failed this check at FastAPI 0.141.1 versus declared 0.162.2. Its later NumPy/SciPy executions are supplementary observations, not a reproduction of the locked CI environment. scripts/check_dependency_versions.py, requirements-api.lock, requirements-studies.lock.

Windows users can use .\.venv\Scripts\python.exe and the PowerShell TWIN_PYTHON assignment in CONTRIBUTING.md. Keep that interpreter selected for Node-to-Python comparisons and the native file reader. Do not change operating-system symlink policy to hide test skips; the existing guide explains the local Windows capability distinction. Native reader contract.

Local dashboard and static demo

The source uses a locked Node/React/Vite workspace. Node 24 is the contributor/CI route. Install and build from the repository root:

npm --prefix apps/web ci --ignore-scripts
npm --prefix apps/web run build
.venv/bin/python -m datacenter_twin serve --port 8000

Open http://127.0.0.1:8000/. A source checkout without the dashboard bundle intentionally returns a 503 build instruction at /; the calculation API can still exist. serve fixes the host to loopback and validates the port. Importing create_app() into another ASGI invocation is a separate trust-boundary choice. datacenter_twin/cli.py, datacenter_twin/api.py:147–161.

For the full static browser workflow, first install the locked Python studies dependencies as above, then:

.venv/bin/python scripts/fetch_study_runtime.py
.venv/bin/python scripts/prepare_browser_demo.py
npm --prefix apps/web run test:engine
npm --prefix apps/web run build:demo
npm --prefix apps/web exec -- playwright install --with-deps chromium
npm --prefix apps/web run test:demo

fetch_study_runtime.py requires the locked local Pyodide package and verifies the two scientific wheels against its lock. prepare_browser_demo.py stages selected public assets and Python archives. Those steps are distinct from preparing only the two fixture JSON files needed by a native Node test subset. Full static builds and browser journeys were not executed in this authoring environment. The 18-file/132-test native subset did execute, with the two parse5-dependent build/SEO files excluded explicitly. scripts/fetch_study_runtime.py:88–110, scripts/prepare_browser_demo.py, apps/web/package.json, apps/web/playwright.demo.config.ts.

The existing browser development guide covers root and repository-subpath mounts, installed dashboard checks and optional scientific downloads. Never treat a checked-in screenshot as a fresh browser test.

Evidence and documentation output

Use a fresh directory below outputs/; existing release packets are historical inputs:

.venv/bin/python scripts/build_evidence.py --output outputs/my-reproduction --revision d8dc3773830a397409a7a9c00a6ffed33c46fb4b
.venv/bin/python scripts/build_evidence.py --verify outputs/my-reproduction

The builder refuses an existing destination. Verification checks manifest bytes and current-engine numerical reproduction; it is not an independent external review. The audit's fresh packet contained 14 artifacts and passed both stages. See worked labs and the evidence method.

The pinned source checkout above predates this handbook. Run the following documentation commands from a checkout containing this documentation package, and record that checkout’s actual documentation revision separately from the scientific source pin.

The added handbook uses Python's standard library plus the Pandoc executable to produce static HTML/MathML:

python docs/reference/build_reference.py
python docs/reference/build_reference.py --check

These are documentation commands, not application build replacements. The repository's software dependencies, lockfiles and workflows are unchanged. If Pandoc is absent, Markdown remains readable; regenerate and validate the checked-in HTML in a capable documentation environment before changing its inputs. Maintenance procedure.

Canonical file: docs/developer/SETUP_AND_REPRODUCIBILITY.md · Back to guide navigation

API, CLI and interface contracts

Source snapshot: d8dc3773830a397409a7a9c00a6ffed33c46fb4b, 19 November 2026. This page maps the supported entry points and their distinct data contracts. The machine-readable author handoff additionally accounts for explicit module exports, methods, CLI declarations, schemas and dynamic UI/worker boundaries. An exported implementation helper is not automatically a stable third-party API.

Command-line entry points

datacenter-twin and python -m datacenter_twin call the same main(argv) entry. pyproject.toml, datacenter_twin/cli.py.

Command Inputs/options Result
--version No scenario Declared engine version
run SCENARIO Schema 1 JSON path Planning JSON with a timestamp outside result
compare BASELINE ALTERNATIVE Two schema 1 paths; identical currency and ordered hours/IT loads Baseline minus alternative energy/cost quantities; no exchange-rate conversion
simulate Mutually exclusive --scenario PATH / --preset ID; default preset utility_loss Schema 2 continuity; --format json|markdown|html
sweep Scenario/preset, default generator_failure; required --parameter and --values One-field sensitivity; 1–20 unique normalized values in caller order; same three output formats
serve --port, default 8000, range 1–65535 Local API and built dashboard on 127.0.0.1
python -m datacenter_twin.emt --preset (default voltage-sag) or --config PATH Ideal circuit JSON
python -m datacenter_twin.research Required --study; optional --config PATH of bounded overrides Scientific study JSON; optional NumPy/SciPy dependencies

Run/compare/simulate/sweep and the separate study CLIs support --output PATH and --force; --force requires an output. Existing destinations are protected by default, and protected input aliases/output symlinks are rejected. A complete temporary result is flushed before hard-link publication or forced os.replace. The filesystem guarantees and limits are detailed in the preserved security policy. Domain/input errors in the main CLI return status 2. datacenter_twin/output.py, datacenter_twin/emt.py, datacenter_twin/research/main.py.

The four sweep parameters are battery_initial_kwh, it_demand_kw, generator_start_delay_s, and distribution_efficiency. Generator delay values must be whole seconds. Full run payloads are omitted together if the sweep's 16 MiB result budget is exceeded; summaries and full_results_included explain that change. The advanced UI's path-capacity comparison constructs separate simulations; it does not add a fifth CLI sweep parameter. datacenter_twin/sensitivity.py, apps/web/src/RunTools.tsx.

JSON contracts and normalization

Contract Required distinctions Boundaries
Schema 1 Scenario / Segment Assumed PUE, ordered hours/IT load, currency, tariff status/date/source IDs PUE ≥ 1; up to 10,000 segments; empty/zero-IT cases have explicit undefined PUE; USD/EUR/INR are labels, not conversion services
Schema 2 SiteScenario Assets, feeds/requires DAGs, one utility/generator/battery/load, explicit charges edge, ordered events Duration 1–86,400 s, step 1–3,600 s, at most 2,000 regular intervals, 64 assets, 256 dependencies and 128 events
Scalar decimal inputs Finite numbers or decimal-compatible text, no Boolean coercion Representation ≤ 128 characters, magnitude ≤ 10¹², ≤ 9 fractional places; field-specific sign/range rules
EMT configuration Exactly ten named fields; SI-prefixed inputs converted explicitly Accepted step choices and event/horizon limits in parameters
Research overrides Study-specific finite bounded fields only Unknown keys and nonfinite nested result values are rejected

Native Python reads at most 4 MiB and rejects duplicate JSON keys, malformed encodings and excessive nesting. The native JavaScript worker's raw JSON route uses JSON.parse; do not extend Python's duplicate-key guarantee to every browser import path. The scenario file picker has a separate 10 MiB file-read limit; a later worker/API body still has its own 4 MiB envelope. Imported results/hashes are not trusted as replacements for recalculation. datacenter_twin/contracts.py, datacenter_twin/topology.py, apps/web/src/javascript-worker.ts, apps/web/src/ScenarioFiles.tsx, existing schema 1, existing schema 2.

Local HTTP API

create_app() declares nine business routes. Swagger/ReDoc are disabled; the constructor does not explicitly disable FastAPI's OpenAPI URL, so do not claim that all framework-generated metadata endpoints are absent. The supported local contract is documented in local-api.md. datacenter_twin/api.py.

Method and path Request Response
GET /api/v1/health None Health/version metadata
GET /api/v1/presets None Preset IDs and names
GET /api/v1/demo Optional preset, default utility_loss Scenario input
GET /api/v1/catalog None Bundled dated catalog
POST /api/v1/simulations Schema 2 scenario Completed continuity run
POST /api/v1/planning Schema 1 scenario Planning result
POST /api/v1/reports Exactly scenario and format (markdown or html) Recomputed report text, format and run ID
POST /api/v1/sweeps Exactly scenario, parameter, values Bounded sensitivity result
POST /api/v1/quotes/normalize Offering/rate assumptions in the catalog contract Unit-normalized quote with explicit unknowns

Malformed/domain inputs are returned as 422 errors. The API enforces streamed input size, loopback Host validation, local Vite CORS origins, cache prevention and its configured content policy. A two-slot semaphore surrounds simulations, reports and sweeps. This is a local queue boundary, not multi-tenant scheduling or authentication. The CLI supplies loopback binding; create_app() does not bind a network socket. There are no EMT or research REST endpoints. datacenter_twin/api.py, datacenter_twin/browser.py:20–35, datacenter_twin/catalog.py.

Native Python library families

Module / public entry Contract to retain
contracts: Scenario, Segment, InputError, number, parse_json_document, load_json_document, load_scenario, decimal_text Strict planning/input representation and explicit errors
topology: Asset, Dependency, Event, SiteScenario, topological_order, numeric/list validators Schema 2 topology and event invariants before simulation
engine: simulate, compare Planning values and like-for-like comparison; no continuity inference
continuity: simulate_continuity, SimulationRun, FlowNetwork, quantity/currency formatters Exact rational model and deterministic serialization; low-level flow helpers assume their specified inputs
demo: demo_scenario, FacilityProfile Named synthetic inputs; profiles scale ratings/demand/reserve, not compute performance
sensitivity: sweep_continuity Validated one-field changes from the same original scenario
reporting: render_markdown, render_html Continuity/sweep presentation with escaped fields, units and limitations
catalog: load_catalog, normalize_quote Bundled provenance and declared billing units; no live price fetch
calculations: node_charge, token_charge, battery_runtime_hours, steady_heat_kw, NodeCharge Unit-labelled arithmetic; zero-load battery duration returns None
output: write_result Protected paths, explicit overwrite and atomic publication behavior
browser: dispatch_json, scenario_report, scenario_sweep Fixed JSON operations; no caller-provided Python program
emt: validate_config, simulate_emt, EMTResult Ideal circuit/configuration contract, separate from continuity
spectrum: spectrum Real-record single-sided amplitude spectrum; duration is inclusive endpoint span
research: run_study and study-specific numerical/helper/type modules Five configured studies; equilibrium, finite-state and conditioning diagnostics; helper exports do not imply a new public study

Canonical implementations: datacenter_twin/contracts.py, datacenter_twin/topology.py, datacenter_twin/engine.py, datacenter_twin/continuity.py, datacenter_twin/calculations.py, datacenter_twin/research/init.py. Definitions and their members remain source-located in the structured interface inventory; imported aliases and type-only declarations are distinguished from execution.

Browser modules, controls and exports

js-engine/index.ts is the native numerical export barrel: rational/canonical helpers, validation, planning, continuity, sweeps, reports, quote normalization and corresponding types. The TypeScript parser used for the author inventory was version 5.9.3; syntax parsing did not run the repository's TypeScript 7.0.2 compiler or resolve all dynamic imports. apps/web/src/js-engine/index.ts, apps/web/package.json.

Surface Public/control behavior Verification boundary
Guide and continuity course Predict, run, inspect completed result, compare reserve, export; lesson 3 disables charging Native engine comparisons executed; fresh click/keyboard journeys remain separate browser checks
Advanced workspace Presets/profiles, bounded edits, imports, ordered demand events, baseline, replay, JSON/report/sweep export Replay is presentation of calculated intervals; comparable-cost guards require matching assumptions
Infrastructure course Numeric screens, source labels, prediction, frozen report and six review states with reasons calculateScreen('releaseGate', states) accepts string states; buildScreenResult accepts numeric lesson inputs and rejects those states
EMT Draft validation, native result, explicit re-run, replay/seek, refinement and optional Python comparison Initial default result is calculated on mount; changing a draft does not replace it
Dynamics Five study choices, finite bounded drafts, explicit run, solver feedback, completed JSON/CSV Scientific worker is loaded separately; dirty drafts remain visibly distinct from applied configuration
Course/discovery registry 24 course entries; EMT + five dynamics items yield 30 learning items in discovery Eighteen presets are a different catalog; the offline companion has four modules
Legacy companion globals LabSimulation exposes specs/parameter resolution/evaluation/checkpoints; LabDashboard exposes read-only state and pure evaluator hooks Active model is cooling; other shared evaluator kinds are not the selected datacenter lesson model

The release-gate wrapper mismatch is an existing interface limitation, not a current lesson failure: the twelve infrastructure lessons use numeric models and lesson 24 uses designReview. It is recorded as proposed code work in technical debt, without modifying the implementation. apps/web/src/infrastructure/screens.ts:679–717, apps/web/src/infrastructure/screens.ts:796–838, apps/web/src/infrastructure/InfrastructureCourse.tsx, apps/web/src/curriculum.ts, apps/web/learn-manifest.ts, docs/index.html:494–495.

Reports escape HTML/Markdown text. EMT CSV carries model, applied configuration and assumptions with each row; research CSV adds study, solver and chart labels. These are exports of completed results, not full restart checkpoints for an external solver. apps/web/src/js-engine/report.ts:236–417, apps/web/src/result-csv.ts, apps/web/src/lesson-worksheet.ts.

Build and maintenance interfaces

The existing scripts expose lock/installed checks, fresh evidence build/verify, demand-timing reproduction, continuity benchmarking, wheel verification, public-site auditing and Pages redirect building. Network fetches and live-site audits are opt-in operations with their own evidence, not side effects of simulation. The course registry's --check detects staleness; omitting it writes the generated catalog. See scripts/sync_course_registry.mjs, scripts/fetch_study_runtime.py, scripts/build_evidence.py, scripts/reproduce_demand_timing.py, scripts/benchmark_continuity.py, scripts/verify_distribution.py, scripts/audit_public_site.py and the maintenance runbook.

Canonical file: docs/developer/API_CLI_AND_INTERFACES.md · Back to guide navigation

Worked examples and labs

These labs use the inspected source d8dc3773830a397409a7a9c00a6ffed33c46fb4b. All quantities are synthetic. Run from the repository root with Python 3.12+; optional scientific or browser work has additional dependencies listed in setup. The observations below were recorded on 19 November 2026, independently of historical release receipts.

Lab 1 — Separate power, energy and assumed PUE

Goal: derive the schema 1 result before reading it. Time: about 5 minutes. Prerequisite: standard-library core.

python -m datacenter_twin run data/scenarios/baseline-1mw.json

The input specifies 1,000 kW IT demand for 8,760 hours, assumed PUE 1.25 and an illustrative USD 0.10/kWh rate. Thus IT energy is 8,760,000 kWh, facility energy is 10,950,000 kWh, non-IT energy is 2,190,000 kWh and energy-only cost is USD 1,095,000.00. These values were observed, with input SHA-256 a47c8a0a720a79be29f25769034072440801295b91a6011f14ac99725dea87ed and run ID ec0f888b610cc84125cf. data/scenarios/baseline-1mw.json, datacenter_twin/engine.py.

Check: calculate 1000 × 8760 × 1.25 yourself. Interpretation: supply continuity is not evaluated; all facility demand is assumed grid imported. Adding another cooling allowance would double-count an overhead already represented by PUE. The rate is an input assumption, not a market price.

Lab 2 — Derive an exact depletion event

Goal: distinguish time from the outage from elapsed simulation time. Time: about 10 minutes. Prerequisite: standard-library core.

python -m datacenter_twin simulate --preset generator_failure

Utility and generator become unavailable at 300 s, with utility recovery at 900 s. For an initially full 100 kWh battery:

EIT=100×0.90×0.95=85.5kWh,Δt=85.51000×3600=307.8s.E_{IT}=100\times0.90\times0.95=85.5\ \mathrm{kWh},\qquad \Delta t=\frac{85.5}{1000}\times3600=307.8\ \mathrm{s}.

Depletion occurs at 607.8 s elapsed, leaving 292.2 s of unserved demand before recovery. The observed run requested 500 kWh and served 418.833333… kWh; unserved energy was 81.166666… kWh. It contained 181 intervals because the exact depletion boundary splits a nominal step. Input SHA-256 was 202d1950bc8762c95216904dd9bbc890c1e1cdb51fe3f824e6e3d98f76410195, run ID 109d4a3eabb61e4dff3d. datacenter_twin/demo.py, datacenter_twin/continuity.py.

Check: inspect the emitted battery_depleted event and reconstruct requested = served + unserved. The exact internal source/storage/loss residual is zero; independently summing finite decimal exports needs the documented serialization tolerance. Interpretation: this CLI preset allows charging. At full initial reserve it shares a numeric event time with the guided lesson, but not the same configuration, input digest or run ID.

Lab 3 — Why halving reserve does not always halve ride-through

Goal: account for pre-outage charging. Time: about 10 minutes.

python -m datacenter_twin sweep --preset generator_failure --parameter battery_initial_kwh --values 0 50 100 --format markdown
Opening reserve Depletion, elapsed s Unserved duration, s Reason
0 kWh 324.3675 575.6325 Some energy charges before the outage
50 kWh 478.2675 421.7325 Initial energy plus 300 seconds of charging
100 kWh 607.8 292.2 Starts full; no pre-outage storage increase

All three rows were observed in the recorded sweep. For the 50 kWh case, stored energy at the outage is

50+100×0.95×3003600=57.916666…kWh.50+100\times0.95\times\frac{300}{3600}=57.916666\ldots\ \mathrm{kWh}.

After applying discharge and distribution efficiencies, ride-through is 178.2675 s, so elapsed depletion is 478.2675 s. The separate charging-disabled guided scenario gives 453.9 s elapsed. Follow the existing canonical recipe, sensitivity explanation and notebook for the contrast. Changing just reserve preserves all other topology/cost inputs; it does not size real equipment. datacenter_twin/sensitivity.py, docs/examples/battery-ride-through.ipynb.

Lab 4 — Reproduce a complete evidence packet

Goal: retain inputs, reports and byte identities together. Time: about 5 minutes.

python scripts/build_evidence.py --output outputs/my-evidence --revision d8dc3773830a397409a7a9c00a6ffed33c46fb4b
python scripts/build_evidence.py --verify outputs/my-evidence

Choose an unused output directory. The author's fresh directory contained 14 artifacts, passed manifest verification and current-engine numerical reproduction, and had manifest SHA-256 9c435f005764f65fcc02d8a5a2db4b9918118fccaeb0bf3b0cee0919b894228f. A separately named output directory can affect receipt/provenance bytes; compare the actual manifest rather than assuming every packet has this digest. Original release directories were unchanged. scripts/build_evidence.py, evidence method.

Check: verify every declared hash and the scenario-derived values. Interpretation: a maintainer/agent-generated packet is an inspectable software result, not independent external reproduction or facility calibration.

Goal: relate a voltage sag, signed current and energy residual. Time: about 15 minutes. Prerequisite: standard-library core; no SciPy.

python -m datacenter_twin.emt --preset voltage-sag

The observed default used 800 V, 0.08 Ω, 0.6 mH, 12 mF and a 12.8 Ω load; source voltage was 0.5 pu from 40 to 120 ms. A 20 μs RK4 step produced 2,001 output rows at 100 μs spacing over 200 ms. Observed summary: initial bus 795.0310559 V; minimum bus 178.9504379 V; peak source current 1,427.080754 A; recovery peak 1,014.100921 V; balance error approximately −1.379×10⁻⁷ J. These are integration-endpoint extrema for this implementation and environment. datacenter_twin/emt.py, EMT equations.

Check: derive the initial DC equilibrium i = Vs/(R + RL) and v = RL × i. In the browser, compare the completed result with Python, then use the available half-step refinement. Keep signed ideal-source energy and possible negative capacitor voltage; do not clip them to make the plot look like a protected physical converter. This circuit contains no switching semiconductor, UPS control or protective clamp.

Lab 6 — Verify bounded infrastructure arithmetic

Goal: compare typed browser screens with separately written Python equations. Time: about 10 minutes. Prerequisite: Python and Node with native TypeScript stripping.

python scripts/verify_infrastructure.py

The observed check passed 24 cases and 222 numeric/state comparisons, using relative tolerance 1e-11 and absolute tolerance 1e-10. It covers 11 model families used by the 12 infrastructure lessons. It does not independently implement all 15 calculateScreen model IDs: availability, fuelScreen, conductorScreen and releaseGate have separate native unit checks. scripts/verify_infrastructure.py, apps/web/tests-engine/infrastructure.test.ts.

Check: for a load ledger, carry kW, kVA, kV and amperes through the line-current formula. For thermal arithmetic, note that the infrastructure water specific heat is J/(kg·K), while the small Python steady_heat_kw helper takes kJ/(kg·K). Interpretation: equation agreement validates these teaching calculations only. Engineering HOLD, missing site evidence and source-rights boundaries remain.

Lab 7 — Inspect a research result with its diagnostics

Goal: distinguish numerical convergence from scientific validation. Time: about 20 minutes. Prerequisite: verified scientific dependencies.

python -m datacenter_twin.research --study modal
python -m unittest discover -s tests -p 'test_research*.py' -v
python -m unittest discover -s tests -p test_spectrum_parity.py -v

The author executed the existing research suite (37 passes) and spectrum parity suite (2 passes) using available NumPy 2.3.5/SciPy 1.17.0. Those versions differ from declared pins; this is supplementary execution, not locked CI reproduction. The research tests exercise all five defaults, residual recomputation, Schur feedthrough and BDF refinement, plus rejection boundaries. The CLI itself is covered by the existing research command tests. tests/test_research.py, tests/test_research_guards.py, tests/test_spectrum_parity.py.

Check: inspect residuals, conditioning, accepted input bounds and solver metadata before reading a modal flag or chart peak. The stable flag uses a numerical real-part threshold; sampled transfer peaks are not continuous optimization. The spectrum is amplitude, not power spectral density. Original MATLAB files and the measured GPU trace were absent from the supplied adaptation; no run can establish equivalence to unavailable inputs. Research derivations and limits.

Record a useful lab result

Retain the exact source SHA, environment, command, exit status, original input, input hash/run ID where defined, raw output digest, expected arithmetic, observed values, units, tolerance and unresolved limitations. Exporting a chart without its applied configuration is insufficient. Keep source checks separate from later documentation, merge and deployment identities. Verification ledger.

Canonical file: docs/developer/WORKED_EXAMPLES_AND_LABS.md · Back to guide navigation

Troubleshooting by boundary

Use the error and exact source revision to identify the failing boundary. Preserve a failing input and raw diagnostic before changing anything. The examples here refer to d8dc3773830a397409a7a9c00a6ffed33c46fb4b; they are not permission to weaken a validator or a scientific tolerance.

Symptom Likely boundary Useful next action
ModuleNotFoundError for API or studies packages Optional extras are absent from the selected Python Confirm TWIN_PYTHON, run lock-only validation, install corresponding locks, then run installed-version checks
Installed-version diagnostic fails Available environment differs from declarations Record both versions; reproduce with the locks before calling it CI-equivalent; do not loosen pins
/ returns 503, while API routes exist Dashboard bundle is missing Run the existing apps/web install/build steps; use the local API contract independently
JSON is rejected Size, encoding, duplicate fields, numeric precision, unknown keys or model-specific bounds Start from a bundled valid fixture and change one field; Python and browser raw JSON parsers have distinct duplicate-key behavior
Output already exists / unsafe output Atomic writer protects files and input aliases Choose a new destination; use --force only for a deliberately replaceable output
50 kWh depletion is 478.2675 s rather than 453.9 s Charging-enabled preset versus charging-disabled guide Inspect battery_charge_kw, scenario identity and input hash; count time from the 300 s outage separately
Generator does not start after a path failure Start logic follows utility asset availability Inspect the event's target and topology; a downstream outage does not make the utility asset unavailable
IT capacity warning without extra dispatch clipping it_capacity_kw is a reporting envelope Inspect gross topology capacities and distribution efficiency; do not treat the warning field as another network capacity
Decimal export sums leave a tiny residue Exact rational totals were serialized to finite decimal text Apply the existing evidence-method tolerance; do not replace the invariant with a visually rounded sum
Browser result still shows old inputs Draft changes have not replaced the completed run Use explicit calculate/run, then inspect applied configuration and run identity before exporting
Worker timeout or cancelled comparison Shared worker request lifecycle Retry the bounded operation after recording the failure; timeout rejects all pending work, while abort preserves other pending requests
Scientific wheel/archive digest mismatch Verified runtime staging failed Keep the rejected bytes out of the cache, inspect the pinned lock and transport; never bypass SHA-256 checks
Research equilibrium, condition number or BDF rejection Numerical acceptance boundary Retain study/config/diagnostics; use accepted bounds and verify the same dependency versions before interpreting a model failure
EMT negative voltage or reverse source power Allowed ideal circuit behavior Check signed definitions and missing physical clamps; do not infer real hardware capability
buildScreenResult('releaseGate', ...) rejects states Numeric lesson wrapper differs from direct state-based model Use the documented direct interface for review states; a future API repair needs a scoped source change and tests
Native Node subset passes but full build fails Different validation scope Run locked typecheck/build/parse5 tests and browser checks; native arithmetic parity does not cover the whole frontend
New handbook absent from a live site Publication route or artifact mismatch Verify the docs copy in the exact merged artifact; distinguish GitHub Pages from the separate custom-domain Direct Upload

Source boundaries: datacenter_twin/contracts.py, datacenter_twin/output.py, datacenter_twin/continuity.py, apps/web/src/worker-request.ts, scripts/fetch_study_runtime.py, datacenter_twin/research/sdcib.py, apps/web/src/infrastructure/screens.ts:679–717, apps/web/src/infrastructure/screens.ts:796–838, .github/workflows/tests.yml:200–219.

Report a reproducible issue

Include the smallest public-safe input, command or page/control sequence, exact source/version, expected result with units, observed result/error, and environment. Remove private site traces, account credentials and private manuals. For confidential vulnerabilities use the preserved security policy; for ordinary support use SUPPORT.md.

A failed local capability is not a failed algorithm. A successful software test is not a calibrated facility result. Consult the evidence ledger for dated execution scope and technical debt for proposals that require a later implementation change.

Canonical file: docs/developer/TROUBLESHOOTING.md · Back to guide navigation

Equations and derivations

This document describes the implemented models at source d8dc3773830a397409a7a9c00a6ffed33c46fb4b. Equations below retain their software boundaries, signs and units. They do not convert synthetic inputs into facility validation. Use parameters and symbols for accepted domains and assumptions and limits for interpretation.

Model boundaries before arithmetic

Model Independent variable Numerical method Meaning of its result
Schema 1 planning Ordered duration segments, hours Decimal, 100 significant digits, half-even rounding Demand/energy estimate using assumed PUE
Schema 2 continuity Elapsed seconds and discrete events Exact rational flow and energy accounting; finite decimal export Served/unserved aggregate IT energy under declared availability/topology
Infrastructure screens Declared scalar inputs JavaScript finite-number algebra with guards Bounded teaching screen with source labels and Engineering HOLD
DC-link EMT Seconds internally, ms/μs in inputs/output Fixed-step classical RK4 for two physical states and three energy ledgers Ideal DC-equivalent transient
Power-dynamics research Seconds, normalized states and local perturbations Equilibrium solve, finite-difference linearization, modal analysis and BDF where applicable Numerical behavior of the supplied/adapted reduced equations
Offline companion Minutes Closed-form cooling proxy evaluated independently at each sample Synthetic utilization/cooling illustration

Implementations: datacenter_twin/engine.py, datacenter_twin/continuity.py, apps/web/src/infrastructure/screens.ts, datacenter_twin/emt.py, datacenter_twin/research/sdcib.py, docs/index.html:254–346.

Schema 1: assumed-PUE planning

For segment jj, let PIT,jP_{IT,j} be kW, hjh_j hours and rjr_j the assumed dimensionless PUE:

Pfacility,j=rjPIT,j,EIT,j=PIT,jhj,Efacility,j=rjPIT,jhj.P_{facility,j}=r_jP_{IT,j},\quad E_{IT,j}=P_{IT,j}h_j,\quad E_{facility,j}=r_jP_{IT,j}h_j.

Sum energy over segments. Non-IT energy is Efacility−EITE_{facility}-E_{IT}; period PUE is Efacility/EITE_{facility}/E_{IT} when IT energy is positive, otherwise null with a reason. Peak IT demand and its margin against it_capacity_kw are screens, not electrical dispatch. All facility energy is assumed grid imported. datacenter_twin/engine.py:11–91.

For a known illustrative tariff cc in currency/kWh, energy-only cost is cEfacilitycE_{facility} rounded to 0.01 with half-even rounding. Unknown tariff remains null. Comparison uses baseline minus alternative, requires equal currency and identical ordered (hours, it_load_kw) pairs, and does not infer exchange rates or comparable work from different demand profiles. datacenter_twin/engine.py:94–126.

The smaller arithmetic helpers separately compute node-hour cost HcHc, provisioned GPU-hour rate c/nc/n, and token cost (Nincin+Noutcout)/106(N_{in}c_{in}+N_{out}c_{out})/10^6. They normalize declared billing units, not throughput equivalence. battery_runtime_hours divides already-deliverable kWh by kW and returns None for zero load. steady_heat_kw uses ṁcpΔT\dot m c_p\Delta T with cpc_p in kJ/(kg·K), producing kW. datacenter_twin/calculations.py:16–72, datacenter_twin/catalog.py.

Schema 2: event-driven electrical continuity

Topology and dispatch

The contract contains one utility, generator, battery and aggregate IT load, with optional buses/distribution assets. feeds and requires graphs are acyclic; an explicit bus-to-battery charges edge defines charging reachability. The solver splits nodes to impose their gross power capacities and uses deterministic breadth-first residual-network augmentation. Source priority is utility, then generator, then battery; residual rerouting can reallocate earlier paths while respecting capacities. This is a max-flow model, not impedance-based AC load sharing. datacenter_twin/topology.py, datacenter_twin/continuity.py.

Let PgrossP_{gross} be flow arriving at the load before distribution losses and ηd\eta_d distribution efficiency. The served IT power is

Pserved=ηdPgross,Punserved=Prequested−Pserved.P_{served}=\eta_dP_{gross},\qquad P_{unserved}=P_{requested}-P_{served}.

All node/path caps, including the load asset's capacity_kw, apply on the gross pre-distribution side. it_capacity_kw separately creates a margin/warning and does not add another dispatch cap. A 700 kW surviving distribution path at ηd=0.95\eta_d=0.95 can deliver 665 kW at the IT boundary. datacenter_twin/continuity.py:337–364, datacenter_twin/continuity.py:522–548, datacenter_twin/continuity.py:579–580, datacenter_twin/continuity.py:669–670.

Event order and exact boundaries

External events at the same second retain their input order. Generator startup is triggered by utility-asset unavailability; a downstream path failure alone does not start it. Availability restoration or generator unavailability resets the corresponding readiness behavior. Charging uses spare utility only, with the required assets and charge path available; the solver does not charge while discharging or from generator dispatch. datacenter_twin/continuity.py:308–364.

For each iteration the interval end is the earliest of the next regular step, external event, generator-ready time, exact empty/full battery boundary and horizon. Consequently, the output interval count may exceed the nominal regular-step count. The separate runtime guard is evaluated in the implementation; it is not a promise of exactly 5,000 possible rows. A 10-second input step therefore does not quantize depletion to a 10-second grid. datacenter_twin/continuity.py.

Battery state and energy conservation

Let Δh=Δt/3600\Delta h=\Delta t/3600, charge power Pc≥0P_c\ge0, delivered battery power Pb≥0P_b\ge0, charging efficiency ηc\eta_c, discharge efficiency ηb\eta_b, and stored energy BB in kWh:

ΔB=ηcPcΔh−PbΔhηb.\Delta B=\eta_cP_c\Delta h-\frac{P_b\Delta h}{\eta_b}.

The conversion losses in that interval are

Lc=PcΔh(1−ηc),Lb=PbΔh(1ηb−1),Ld=(Pgross−Pserved)Δh.L_c=P_c\Delta h(1-\eta_c),\quad L_b=P_b\Delta h\left(\frac1{\eta_b}-1\right),\quad L_d=(P_{gross}-P_{served})\Delta h.

With grid energy including utility energy used for charging, the exact invariant is

Egrid+Egenerator−ΔB−Eserved−Lc−Lb−Ld=0.E_{grid}+E_{generator}-\Delta B-E_{served}-L_c-L_b-L_d=0.

Also Erequested=Eserved+EunservedE_{requested}=E_{served}+E_{unserved}. Opening stored energy is an initial state; it is not charged again as current-period grid/generator energy. Unknown energy rates propagate to cost when positive energy requires that rate; zero generator energy can have zero cost even when its rate is unknown. datacenter_twin/continuity.py:522–548, datacenter_twin/continuity.py.

The engine checks this identity using Fraction before formatting with a 100-digit Decimal context. Exported energy_balance_residual_kwh: "0" describes that internal invariant, not an independent measurement. The evidence builder independently reconstructs the ledger from exported decimal terms and allows absolute 10−9010^{-90} in the displayed unit for serialization rounding; it does not read the residual field to decide that reconstruction passes. docs/validation/evidence-method.md:3–21, scripts/build_evidence.py.

A hand-checkable battery example

For 100 kWh opening energy, ηb=0.90\eta_b=0.90, ηd=0.95\eta_d=0.95 and 1,000 kW IT demand with no other source:

Edeliverable=100(0.90)(0.95)=85.5kWh,tride=85.51000(3600)=307.8s.E_{deliverable}=100(0.90)(0.95)=85.5\ \mathrm{kWh},\qquad t_{ride}=\frac{85.5}{1000}(3600)=307.8\ \mathrm{s}.

The outage starts at elapsed 300 s, so depletion is at 607.8 s. At 50 kWh with charging disabled, ride-through is 153.9 s and depletion 453.9 s. The CLI preset's enabled 100 kW charging adds 100(0.95)(300/3600)=7.916666…100(0.95)(300/3600)=7.916666\ldots kWh before the outage, giving 478.2675 s elapsed for that separate 50 kWh case. The guided scenario and CLI preset therefore have different metadata and hashes even when the full-reserve event time matches. docs/canonical-case.md, docs/examples/battery-ride-through.ipynb, observed labs.

Infrastructure screens

These equations are separate from continuity dispatch. Inputs/results carry units and evidence labels; numeric results are guarded against nonfinite intermediates. A positive capacity margin is an algebraic screen and does not remove Engineering HOLD. The implementation exposes 15 model IDs. apps/web/src/infrastructure/screens.ts.

Model Implemented relation and units Interpretation boundary
loadLedger PIT=NrackPrackfd(1+g)P_{IT}=N_{rack}P_{rack}f_d(1+g); Pf=PITrP_f=P_{IT}r; S=Pf/pfS=P_f/pf; I=S/(3VkV)I=S/(\sqrt3V_{kV}) for S in kVA Design-point ratio rr is assumed, not automatically annual measured PUE; residual overhead is facility minus IT minus declared cooling
capacityBank Cu=CunitdℓC_u=C_{unit}d\ell; Cavailable=(n−nunavailable)CuC_{available}=(n-n_{unavailable})C_u; nN+1=⌈P/Cu⌉+1n_{N+1}=\lceil P/C_u\rceil+1 Uses a bounded eight-epsilon floating comparison tolerance, not an engineering contingency margin
availability q=MTTR/(MTBF+MTTR)q=MTTR/(MTBF+MTTR); independent pair q2q^2; combined qs+(1−qs)q2q_s+(1-q_s)q^2; annual minutes 8760×60qcombined8760\times60\,q_{combined} Assumed independence/common contribution; not calibrated reliability or continuity simulation
transformerScreen Zb=V2/(SMVA106)Z_b=V^2/(S_{MVA}10^6); Zt=z%Zb/100Z_t=z_\%Z_b/100; Zs=V2/(Ssource,MVA106)Z_s=V^2/(S_{source,MVA}10^6); IkA=V/[3(Zt+Zs)1000]I_{kA}=V/[\sqrt3(Z_t+Z_s)1000] Simplified balanced scalar screen; null source MVA means the modeled infinite bus
fuelScreen Volume L = load kW × hours × L/kWh Constant assumed consumption; no generator dynamics or equipment selection
storageScreen EAC=PACtmin/60E_{AC}=P_{AC}t_{min}/60; EDC=EAC/ηE_{DC}=E_{AC}/\eta; Enom=EDC/(fdischargefretained)E_{nom}=E_{DC}/(f_{discharge}f_{retained}); IDC=1000PAC/(ηVmin)I_{DC}=1000P_{AC}/(\eta V_{min}) Declared efficiency/retention factors, not a calibrated battery-aging curve
inverseTime t=0.14TMS/[M0.02−1]t=0.14\,TMS/[M^{0.02}-1], implemented with expm1(0.02 log(M)); M≤1M\le1 gives no trip time Curve illustration, not a relay-setting instruction or coordination proof
conductorScreen S=It/kS=I\sqrt t/k in the declared A, s and material coefficient units Simplified adiabatic screen, not installation compliance
auxiliaryScreen THD = 100Ih/I1100I_h/I_1; TDD = 100Ih/Iref100I_h/I_{ref}; GPR = IgRgI_gR_g; DC drop = 2ILone−wayr2IL_{one-way}r Scalar arithmetic; no waveform, grounding-grid or harmonic study
thermalScreen Net MW = heat − removal; liquid/air split from rack kW and capture fraction; ṁ=1000Pliquid,kW/(cp,J/kgKΔT)\dot m=1000P_{liquid,kW}/(c_{p,J/kgK}\Delta T); airflow = 1000Pair,kW/(ρcpΔT)1000P_{air,kW}/(\rho c_p\Delta T) Water/air properties are declared constants; no CFD or control loop
thermalScreen transient dT/dt=Qnet,MW/CMJ/KdT/dt=Q_{net,MW}/C_{MJ/K}; time to limit = CΔT/QnetC\Delta T/Q_{net} when net heat is positive, otherwise null Lumped constant heat-capacity slope, not a time-varying thermal simulation
networkScreen Optical loss = length km × dB/km + connector + splice loss; margin = budget − loss − chosen margin; active uplink = surviving uplinks × rate Oversubscription ratio is downlink aggregate / active uplink; disconnected ratio is null; no traffic queue/latency model
facilityScreen Average pressure = mg/(1000A)mg/(1000A) kPa; cooling capacity = units × tons/unit × kW/ton Average load/capacity calculation, not structural or plant verification
commissioningScreen Restore time is the sum of declared stages; electrical/thermal margin = limit − restore; IT MWh = MW × h; facility MWh = IT × PUE First-order uncertainty uses uPUE=PUEuf2+uIT2u_{PUE}=PUE\sqrt{u_f^2+u_{IT}^2} for independent relative input uncertainties
designReview Per-side required load compared with available unit capacity, including one-unit-out screen Structured review of numeric assumptions, not a certification decision
releaseGate Six explicit states; any fail or unresolved gives HOLD; all pass gives teaching-screens-satisfied certification remains false; direct string-state interface differs from the numeric buildScreenResult wrapper

The existing Python verifier compares 24 cases/222 values and states across 11 model families, at rel_tol=1e-11, abs_tol=1e-10. Other models have native unit tests. That scoped result must not become a claim that every screen has a separate independent Python implementation. scripts/verify_infrastructure.py, apps/web/tests-engine/infrastructure.test.ts.

The ideal source VsV_s feeds series R,LR,L and parallel C,RLC,R_L. States are source current ii and bus voltage vv:

didt=Vs−Ri−vL,dvdt=i−v/RLC.\frac{di}{dt}=\frac{V_s-Ri-v}{L},\qquad \frac{dv}{dt}=\frac{i-v/R_L}{C}.

Initial conditions are the pre-sag DC equilibrium i0=Vs/(R+RL)i_0=V_s/(R+R_L) and v0=RLi0v_0=R_Li_0. mH and mF inputs are multiplied by 10−310^{-3}; integration uses seconds. During the source sag VsV_s is multiplied by sag_pu, then restored. datacenter_twin/emt.py:49–59, datacenter_twin/emt.py:121–185.

Stored energy is W=Li2/2+Cv2/2W=Li^2/2+Cv^2/2. Three additional integrated states accumulate source energy, resistor loss and load energy:

Ės=Vsi,ĖR=Ri2,ĖL=v2/RL.\dot E_s=V_si,\qquad\dot E_R=Ri^2,\qquad\dot E_L=v^2/R_L.

The numerical residual is Es−ER−EL−(W−W0)E_s-E_R-E_L-(W-W_0). Classical RK4 advances all five states together. The left-interval source value is held at each of the four stages; output at the event boundary uses the right-continuous source. Output spacing is 100 μs, and extrema are evaluated at integration endpoints. They are not analytically optimized continuous-time maxima. Signed EsE_s allows reverse energy into the ideal source; negative capacitor voltage is permitted by this ideal system. datacenter_twin/emt.py, apps/web/src/emt/engine.ts.

Python/native comparison checks complete structure and numeric absolute differences up to 1e-7. Native refinement accepts supported half-step pairs from 10, 20 or 50 μs; the existing tests separately check no-sag invariants and a smaller sampled voltage difference on refinement. Those software tolerances are not a physical error budget. apps/web/tests-engine/emt.test.ts, tests/test_emt.py.

Power dynamics and controls

Provenance and state interpretation

Research equations are adapted from an owner-supplied Python-equivalent archive, SHA-256 c467c157d39a2f36b2951a2a073b01d536c459ea653de5b28785c1b3e1a56cab. Original MATLAB files and the measured GPU trace were not supplied. The wrapper therefore establishes neither MATLAB equivalence nor measured-profile validation. datacenter_twin/research/sdcib_core.py:1–4, datacenter_twin/research/grid_network.py:1–8.

The reduced SDCIB model has 21 states, ordered as PLL angle/integral/filtered quadrature voltage; AFE d/q currents, DC-voltage integral and d/q current integrals; UPS DC voltage; VSI U/V currents, U/V capacitor voltages, voltage integrals and current integrals; PSU voltage/integral; and equivalent-load voltage/integral. STATE_NAMES is authoritative. Electrical variables are normalized; time is seconds and ωb=2π(60)\omega_b=2\pi(60) rad/s, while nominal synchronous speed is 1 pu. Do not relabel every normalized voltage/current as SI V/A without a defined base. datacenter_twin/research/sdcib_core.py:20–43, datacenter_twin/research/sdcib.py:20–62.

Implemented controller structure

For bandwidth fbwf_{bw}, ωn=2πfbw\omega_n=2\pi f_{bw}. The helper tunes voltage PI gains as Kp=2ζωnC/ωbK_p=2\zeta\omega_n C/\omega_b, Ki=ωn2C/ωbK_i=\omega_n^2 C/\omega_b. Current PI uses LL in place of CC and subtracts resistance from KpK_p. PLL gains are 2ζωn/ωb2\zeta\omega_n/\omega_b and ωn2/ωb\omega_n^2/\omega_b. These are the implementation's normalized-loop conventions. datacenter_twin/research/common.py:45–68.

Representative coupled equations show how those loops enter the model:

ωPLL=ωs+Kp,PLLvq,f+Ki,PLLϵ,θ̇=ωb(ωPLL−ωs),ϵ̇=vq,f,v̇q,f=ωlp(vq−vq,f).\omega_{PLL}=\omega_s+K_{p,PLL}v_{q,f}+K_{i,PLL}\epsilon,\quad \dot\theta=\omega_b(\omega_{PLL}-\omega_s),\quad \dot\epsilon=v_{q,f},\quad\dot v_{q,f}=\omega_{lp}(v_q-v_{q,f}).

i̇d=ωbLa(vd−mdvdc−Raid+ωPLLLaiq),i̇q=ωbLa(vq−mqvdc−Raiq−ωPLLLaid).\dot i_d=\frac{\omega_b}{L_a}(v_d-m_dv_{dc}-R_ai_d+\omega_{PLL}L_ai_q),\quad \dot i_q=\frac{\omega_b}{L_a}(v_q-m_qv_{dc}-R_ai_q-\omega_{PLL}L_ai_d).

v̇dc=ωbCdc(mdid+mqiq−mUiU−mViV).\dot v_{dc}=\frac{\omega_b}{C_{dc}}(m_di_d+m_qi_q-m_Ui_U-m_Vi_V).

The VSI U/V current and capacitor-voltage equations include their matching rotation cross terms. The PSU and equivalent-load controls use gload=pload/(3veq,ref2)g_{load}=p_{load}/(3v_{eq,ref}^2), ieq=Kp(veq,ref−veq)+Kiξeqi_{eq}=K_p(v_{eq,ref}-v_{eq})+K_i\xi_{eq} and the implemented guarded conversion between PSU and load voltages. The final load equation is v̇eq=ωb(ieq−gloadveq)/Ceq\dot v_{eq}=\omega_b(i_{eq}-g_{load}v_{eq})/C_{eq}. AFE current-integral errors use actual − reference, whereas VSI current-integral errors use reference − actual; transcribing every controller with one assumed sign would change the implemented system. All 21 derivative assignments and algebraic output definitions are in datacenter_twin/research/sdcib_core.py:118–198.

safe_div preserves the denominator sign while flooring its magnitude at 10−910^{-9}. Other specific voltage denominators use positive floors; the grid-port implementation also has 10−610^{-6} guards. These are numerical regularizations with different contexts, not a universal physical diode or voltage clamp. datacenter_twin/research/common.py:21–26, datacenter_twin/research/datacenter_port_model.py, datacenter_twin/research/sdcib_core.py.

Equilibria, linearization and time integration

The standalone wrapper solves f(x,u)=0f(x,u)=0 with a finite-difference Newton method (up to 80 iterations, residual/step targets 10−1010^{-10}, least-squares fallback and backtracking), then independently recomputes its residual. A SciPy root fallback can be used; accepted equilibrium infinity norm must be below 10−610^{-6}. A step-size stopping condition alone is not accepted as proof of equilibrium. State Jacobian increments are 10−7(1+|xi|)10^{-7}(1+|x_i|); the input perturbation uses 10−6(1+|u|)10^{-6}(1+|u|). datacenter_twin/research/sdcib_core.py:46–85, datacenter_twin/research/sdcib.py, datacenter_twin/research/common.py:29–42.

The load-step study changes command at 0.2 s over a 1 s/201-sample interval. Forced response runs a synthetic sinusoidal command for 2 s with 801 samples. The BDF wrapper uses rtol=1e-6, atol=1e-8, and an ordinary maximum step of 0.002 s; forced response also bounds it by 1/(20f)1/(20f). It rejects failed, incomplete or nonfinite solver output. SciPy documents BDF as an implicit variable-order method; its successful termination is numerical evidence, not proof of the physical model. datacenter_twin/research/sdcib.py, SciPy solve_ivp documentation.

For the local linearization,

δẋ=Aδx+Bδu,δy=Cδx+Dδu,H(j2πf)=C(j2πfI−A)−1B+D.\delta\dot x=A\delta x+B\delta u,\qquad \delta y=C\delta x+D\delta u,\qquad H(j2\pi f)=C(j2\pi fI-A)^{-1}B+D.

Modal eigenvectors require finite condition number ≤ 101210^{12} and left/right residuals within 10−5max(1,∥A∥∞)10^{-5}\max(1,\|A\|_\infty). Participation uses normalized magnitudes of right vectors times conjugated left vectors. The stable field uses Re(λ\lambda) ≤ 10−810^{-8}, a numerical threshold that includes neutral/slightly positive values; it is not strict mathematical asymptotic stability. Transfer peaks are selected from 160 logarithmic samples from 0.1 to 1,000 Hz, not a continuous peak search. datacenter_twin/research/sdcib.py, datacenter_twin/research/grid_network.py:454–482.

Amplitude spectrum, including odd records

For N≥3N\ge3 real finite samples whose endpoint span is TT, the implementation sets Δt=T/(N−1)\Delta t=T/(N-1), removes the mean and applies a symmetric Hann window wnw_n. With X=rfft((x−x‾)w)X=\operatorname{rfft}((x-\bar x)w):

Ak=|Xk|Nmean(w).A_k=\frac{|X_k|}{N\operatorname{mean}(w)}.

Positive-frequency amplitudes are doubled except the even-length Nyquist bin; the final bin of an odd-length record is doubled because it is still a positive-frequency bin with a negative-frequency partner. This is a coherent-gain-normalized amplitude spectrum, not PSD or energy per Hz. An 801-point, 2-second record has sampling frequency 400 Hz and final bin about 199.7503 Hz, not a 200 Hz Nyquist sample. datacenter_twin/spectrum.py:26–39, NumPy rfft reference.

The parity tests compare independent DFTs for 800- and 801-point records at rtol=1e-10, atol=3e-14. A sampled output-spectrum peak need not equal the synthetic forcing frequency exactly. tests/test_spectrum_parity.py, tests/test_research.py.

Phase-model comparison and grid network

The model comparison stacks 41 abc states and 21 reduced U/V states, with no cross-coupling between the two blocks. It retains the supplied hand-set startup, not an equilibrium initial condition. The supplied 1.025 s load event is retimed to 0.04 s in a 0.08 s teaching window, with 221 reported samples. Two BDF intervals use rtol=1e-8, atol=1e-10 and a block Jacobian; this is not the imported 5 μs Heun experiment. The abc model includes smoothing, duty bounds and anti-windup behavior absent from the reduced model, so output RMS difference compares representations rather than measuring physical error. The exposed final-load range is deliberately bounded to the tested study domain. datacenter_twin/research/model_comparison.py, datacenter_twin/research/model_validation.py, tests/test_research.py.

The modified nine-bus grid uses a 100 MVA base, power-flow initialization, four complex port voltages and SM/GFM/GFL/DC device models. Its 9 + 13 + 15 + 21 = 58 dynamic states become 57 after removing the synchronous-machine angle reference. It is not a measured-GPU-profile time simulation. The upstream MATPOWER case9 source is context for the test-network family; the repository's parameterization is a variant, not an assertion of identity with that moving upstream file. datacenter_twin/research/grid_network.py, datacenter_twin/research/sm_port_model.py, datacenter_twin/research/gfm_port_model.py, datacenter_twin/research/gfl_port_model.py, datacenter_twin/research/datacenter_port_model.py.

Network reduction first forms Yeq=Ypp−YplYll−1YlpY_{eq}=Y_{pp}-Y_{pl}Y_{ll}^{-1}Y_{lp}. For linearized differential/algebraic blocks

δẋ=Aδx+Bδv+Eδu,0=Cδx+Dδv+Eaδu,\delta\dot x=A\delta x+B\delta v+E\delta u,\qquad 0=C\delta x+D\delta v+E_a\delta u,

the code forms Aeff=A−BD−1CA_{eff}=A-BD^{-1}C, Beff=E−BD−1EaB_{eff}=E-BD^{-1}E_a, Ceff=−HD−1CC_{eff}=-HD^{-1}C and Deff=−HD−1EaD_{eff}=-HD^{-1}E_a, then removes the same angle coordinate from the corresponding matrices. The algebraic Jacobian must have condition number ≤ 101210^{12}; a recomputed perturbed algebraic solution checks direct feedthrough with relative error ≤ 10−410^{-4}. Generator/converter injections are positive into the network; the consuming DC port uses the opposite injection sign and displayed load power is converted consistently. datacenter_twin/research/grid_network.py:373–453.

Offline companion: the active cooling proxy

The four-module HTML companion selects model.kind = "cooling". Time tt is minutes, NN server count, UU assumed utilization percent, TaT_a ambient °C and COP constant:

u(t)=clamp(U+8sin(t/8)+3cos(t/3),0,100),u(t)=\operatorname{clamp}(U+8\sin(t/8)+3\cos(t/3),0,100), PIT=N(0.12+0.38u/100)kW,Pc=PITCOP[1+0.025max(Ta−20,0)],r=1+Pc/PIT.P_{IT}=N(0.12+0.38u/100)\ \mathrm{kW},\quad P_c=\frac{P_{IT}}{COP}[1+0.025\max(T_a-20,0)],\quad r=1+P_c/P_{IT}.

Its inlet proxy is 22+(Ta−22)e−t/15+[4PIT/(NCOP)](1−e−t/15)22+(T_a-22)e^{-t/15}+[4P_{IT}/(N\,COP)](1-e^{-t/15}). It is a heuristic relaxation with a synthetic utilization wave, not a calibrated thermal state solver. The displayed ratio includes only this modeled cooling overhead. Parameters/time are clamped by this companion evaluator; that behavior differs from the research/EMT draft validators that reject out-of-domain inputs. docs/index.html:242–288, docs/lesson-config.json.

The shared inline evaluator also contains battery, thermal, degradation, grid, agents, markets, control, security and charging branches. Their source dispatch is accounted for, but they are not the selected datacenter companion curriculum or alternate implementations of the native continuity engine. In order, they use coulomb counting with a heuristic voltage/temperature model; first-order thermal relaxation; exponential fade; synthetic solar/demand arithmetic; aggregate queue capacity; synthetic spread/cost arithmetic; an analytical second-order step response; aggregate alert capacity; and piecewise constant/tapered charging. These code paths and their declared MODEL_SPECS remain unchanged; no new execution or physical-validation claim is attached to them. docs/index.html:259–346.

What the verification establishes

Exact ledgers, independent hand arithmetic, differential Python/native tests, finite-value guards, residual recomputation and step refinement address different software risks. None establishes measured facility accuracy, equipment suitability, source-manuscript approval beyond recorded rights, or external scientific review. Read the dated ledger for the actually executed commands, dependency differences and historical CI evidence.

Canonical file: docs/math-and-physics/EQUATIONS_AND_DERIVATIONS.md · Back to guide navigation

Parameters, symbols and units

The tables below use source d8dc3773830a397409a7a9c00a6ffed33c46fb4b. A default is a declared synthetic choice, not a measurement. Field names are more reliable than an informal symbol when moving between model families. Do not treat two fields named “power” or “efficiency” as interchangeable without their boundary.

Planning and shared decimal inputs

Field / symbol Unit and meaning Domain / default
Segment.hours, hh h, duration of one planning segment Positive; ordered segments are part of comparison identity
Segment.it_load_kw, PITP_{IT} kW, requested IT demand Nonnegative; the example uses 1,000
assumed_pue, rr Ratio, assumed facility/IT power ≥ 1; example 1.25
tariff_per_kwh, cc Scenario currency/kWh Nonnegative known illustrative rate or explicit unknown null
currency Currency label USD, EUR or INR; no FX conversion
it_capacity_kw kW, reporting envelope Nonnegative; a screen rather than supply feasibility
Shared decimal representation Decimal/rational quantities No bool/nonfinite values; ≤ 128-character representation, magnitude ≤ 10¹² and ≤ 9 decimal places

datacenter_twin/contracts.py, datacenter_twin/engine.py, data/scenarios/baseline-1mw.json.

Continuity inputs and signs

Field / symbol Unit / boundary Reference preset or accepted range
duration_s s elapsed horizon 1–86,400; reference 1,800
step_s s nominal interval 1–3,600; reference 10; at most 2,000 regular intervals
it_demand_kw, PrequestedP_{requested} kW at the IT boundary Reference 1,000; explicit demand events can change it
Asset capacity_kw kW gross network flow Positive; reference utility 1,500, generator/battery 1,200, each path 700, load asset 2,000
it_capacity_kw kW reporting envelope Reference 1,000; warning/margin, not another dispatch cap
distribution_efficiency, ηd\eta_d IT served / gross incoming load flow (0,1](0,1]; reference 0.95
battery_capacity_kwh, BmaxB_{max} kWh stored Reference 100; finite nonnegative domain
battery_initial_kwh, B0B_0 kWh stored at time zero 0 ≤ opening ≤ capacity; reference 100
battery_charge_kw, PcP_c kW accepted from utility before charging loss Reference 100 in base preset; 0 in canonical guide
battery_charge_efficiency, ηc\eta_c Stored increment / charging input (0,1](0,1]; reference 0.95
battery_discharge_efficiency, ηb\eta_b Delivered battery output / stored decrement (0,1](0,1]; reference 0.90
generator_start_delay_s s after utility unavailability Integer 0–86,400; reference 30
generator_cost_per_kwh Currency/kWh generated Unknown null in reference case; not a fuel/ramp model
Event.at_s Integer elapsed seconds 0 ≤ event time < horizon; equal-time order preserved
ΔB\Delta B / battery_stored_change_kwh kWh, closing minus opening stored energy Negative for net depletion; not a loss term
Grid/generator/battery powers kW, positive supply direction Continuity dispatch is nonnegative; contrast signed EMT source current
Unserved duration s with positive IT deficit Fractional boundary durations allowed

datacenter_twin/topology.py, datacenter_twin/demo.py, datacenter_twin/continuity.py. Profiles of 50 MW AI cluster, 200 MW hyperscale, 30 MW crypto and 5 MW traditional load scale synthetic electrical quantities; they do not provide compute-throughput conversion factors. The 18 presets and 24 lessons are different catalogs.

EMT configuration

Field Unit Default Accepted interval / choices
source_v V 800 400–1,000
resistance_ohm Ω 0.08 0.02–1
inductance_mh mH 0.6 0.1–5
capacitance_mf mF 12 1–50
load_ohm Ω 12.8 2–50
sag_pu Fraction of source voltage 0.5 0.1–1
sag_start_ms ms 40 Integer 10–80
sag_duration_ms ms 80 Integer 5–100
duration_ms ms 200 Integer 200–300; sag must clear before end
step_us μs 20 5, 10, 20, 25 or 50

source_a is signed current through the series inductor; bus_v is signed ideal capacitor voltage. stored_j, source_energy_j, resistor/load energies and balance_error_j are joules. Output samples are 100 μs apart; summary extrema use integration endpoints. Half-step refinement is available for 10, 20 and 50 μs starting steps. datacenter_twin/emt.py, apps/web/src/emt/engine.ts.

Research configuration and state glossary

Exposed field Unit Accepted study domain
load_initial_pu pu 0.3–0.7
load_final_pu pu 0.4–0.8 in load-step, greater than initial; comparison separately bounded to 0.5–0.6
load_pu pu Study-specific bounded operating point; default 0.5
vsi_bandwidth_hz Hz 60–100; default 80 in standalone SDCIB
grid_reactance_pu pu 0.1–0.3; default 0.19
dc_capacitance_pu pu 1–3; default 2
forcing_frequency_hz Hz 0.5–30; default 5
forcing_amplitude_pu pu 0.01–0.05; default 0.03
load_scale Ratio 0.4–0.6 in the modified nine-bus study; default 0.5

The exact per-study field sets/defaults are in datacenter_twin/research/init.py and apps/web/src/research/types.ts. Configurations are not automatically portable between studies. In particular, the model-comparison VSI baseline uses 100 Hz and the hand-set startup from its own source, rather than silently adopting the standalone 80 Hz equilibrium.

Reduced SDCIB state positions Source names Interpretation
0–2 theta_pll, eps_pll, vq_pll PLL angle, integrated filtered q-voltage, filtered q-voltage
3–4 id_afe, iq_afe AFE dq current states
5–7 xi_dc_afe, gamd_afe, gamq_afe DC-voltage and current-error integrals
8 vdc_ups UPS DC-link voltage
9–10 iU_cv, iV_cv VSI U/V converter currents
11–12 vU_vsi, vV_vsi VSI capacitor voltages
13–16 xiU_vsi, xiV_vsi, gamU_vsi, gamV_vsi VSI voltage/current integrals
17–18 v_psu, xi_psu PSU voltage and voltage-error integral
19–20 v_eq, xi_eq Equivalent-load voltage and voltage-error integral

Electrical states are normalized to their supplied model convention; integrals carry the corresponding normalized error × seconds. Angle is in radians. omega_b = 2π60 rad/s and omega_s = 1 pu have distinct dimensions. veq_ref = 0.5 is a normalized voltage reference, not an assertion of 0.5 V or a universal percentage of a physical bus. The grid network explicitly declares a 100 MVA power base; a complete SI conversion of every research state requires additional base definitions. datacenter_twin/research/sdcib_core.py:20–43, datacenter_twin/research/sdcib.py:20–62, datacenter_twin/research/grid_network.py.

Numerical symbol Meaning Implemented convention
A,B,C,DA,B,C,D Local state/input/output Jacobian matrices Finite-difference matrices about recomputed operating point
λ\lambda Eigenvalue Real part in inverse seconds; oscillation frequency |Imλ|/(2π)\lvert\operatorname{Im}\lambda\rvert/(2\pi) Hz
Modal participation Normalized magnitude from left/right vectors Relative numerical attribution, not measured energy share
YeqY_{eq} Reduced four-port network admittance Schur reduction of the modified test network
κ\kappa Matrix condition number Finite and ≤ 10¹² for guarded algebraic/eigenvector operations
stable Numerical mode flag Re(λ\lambda) ≤ 10⁻⁸; not strict asymptotic stability
Spectrum amplitude Same amplitude unit as signal Mean removed, symmetric Hann/coherent-gain corrected; not PSD
duration in spectrum s between first and last sample dt=T/(N−1)dt=T/(N-1), not T/NT/N

datacenter_twin/research/sdcib.py, datacenter_twin/research/grid_network.py, datacenter_twin/spectrum.py.

Infrastructure and companion unit hazards

Context Correct convention Common error to avoid
Infrastructure line current kVA / kV gives A after the three-phase factor Adding an unnecessary ×1,000
Transformer fault screen Voltage in V; MVA converted by 10⁶; output A divided by 1,000 for kA Mixing kV and V inside squared impedance base
Water heat balance thermalScreen uses J/(kg·K) and converts kW to W Reusing the Python helper's kJ/(kg·K) argument without conversion
Lumped thermal time MW / (MJ/K) gives K/s Reading the result as K/h
Optical attenuation Length m converted to km; losses/margin in dB Adding fiber length directly to dB/km
Storage sizing screen Minutes divided by 60; efficiency and retained fractions multiply denominators Treating nominal energy as already deliverable
Commissioning uncertainty Relative independent input uncertainties Claiming a confidence interval or correlated measurement model
Companion time / ratio Minutes; IT plus simplified cooling only Calling it the continuity engine or annual measured PUE

The source's screenUnits table remains the canonical name-to-unit mapping for every screen input/output. Evidence locators carry manuscript chapter/page metadata separately from illustrative assumptions. apps/web/src/infrastructure/screens.ts, docs/lesson-config.json, datacenter_twin/calculations.py:65–72.

Undefined and unknown quantities

Keep null/None and their reason fields. Zero IT energy makes period PUE undefined; zero load makes the small battery-runtime helper undefined; no active network uplink makes oversubscription undefined; nonpositive net heat has no finite rising-temperature limit time in that screen; unknown tariffs are not zero prices. Scenario/solver failures produce errors rather than invented successful outputs. Assumptions and limits.

Canonical file: docs/math-and-physics/PARAMETERS_AND_SYMBOLS.md · Back to guide navigation

Assumptions and limits

The scope below is grounded in source d8dc3773830a397409a7a9c00a6ffed33c46fb4b, inspected on 19 November 2026. It preserves the existing calculation boundaries, release-readiness statement, NOTICE and security policy.

What each family assumes

Family Included Excluded or unresolved
Planning Ordered demand segments, assumed PUE, illustrative/unknown energy-only rates Supply continuity, delivered compute service, demand charges, CAPEX, taxes and calibrated cooling
Continuity One aggregate IT load, nonnegative gross power flow, finite storage, fixed efficiencies, discrete availability/domain events and deterministic recovery AC load flow, impedance sharing, switching/protection transients, battery aging/temperature, generator ramp/cooldown/fuel, probabilistic reliability, cooling/workload queues
Infrastructure screens Explicit scalar equations, input/output units, source labels, selected golden cases and review states Equipment selection, compliance, detailed grounding/protection/CFD/structural/network engineering; Engineering HOLD persists
EMT Ideal DC source, linear R-L/C/resistor circuit, fixed-step RK4 and signed energy Semiconductor switching, rectifier/UPS controllers, clamps, reverse-blocking devices, nonlinear component limits, AC network or thermal physics
Research Adapted reduced equations, bounded synthetic inputs, recomputed initialization, guarded modal/response calculations Missing MATLAB originals, missing measured GPU trace, independently validated physical parameters or facility calibration
Offline companion Synthetic utilization wave, algebraic cooling and heuristic inlet relaxation Native outage dispatch, UPS depletion, server reboot behavior, chiller cascades or measured annual PUE

datacenter_twin/engine.py, datacenter_twin/continuity.py, apps/web/src/infrastructure/screens.ts, datacenter_twin/emt.py, datacenter_twin/research/grid_network.py:1–8, docs/lesson-config.json.

Numerical agreement has a defined scope

The continuity invariant is exact inside a rational model. Its exported zero residual is not a physical sensor reading. The separately reconstructed finite-decimal ledger tolerates serialization rounding. The TypeScript/Python parity tests compare independently implemented software for stated fixtures; shared assumptions can still be wrong. A passing equation check for a teaching screen does not establish design suitability. docs/validation/evidence-method.md, apps/web/tests-engine/engine.test.ts, scripts/verify_infrastructure.py.

EMT tolerances are numerical comparisons and refinement checks. Its endpoints can miss a continuous-time extremum; its ideal source can absorb energy and its ideal capacitor voltage can become negative. Replacing those results with clipped values would alter the model, not correct a documentation issue. datacenter_twin/emt.py, apps/web/src/emt/engine.ts.

Research acceptance checks recompute residuals and reject nonfinite/ill-conditioned results. They do not prove global convergence, uniqueness, physical realizability or a domain outside the exposed parameter bounds. The mode flag includes real parts up to 10−810^{-8}, so it must not be paraphrased as strict asymptotic stability. Frequency-response peaks are sampled on a finite grid. The model comparison retains startup transients and two different representations; disagreement is not automatically an error in one model. datacenter_twin/research/sdcib.py, datacenter_twin/research/model_comparison.py, datacenter_twin/research/grid_network.py.

Interface and data assumptions

Input validation has several layers. Python JSON parsing rejects duplicate keys and has a 4 MiB boundary; browser JSON.parse does not supply the same duplicate-key rule. The file picker permits a 10 MiB read before revalidation and later request-size checks. Typed declarations do not replace runtime validation. A source parse is not a typecheck, and a native Node test is not a browser journey. datacenter_twin/contracts.py, apps/web/src/javascript-worker.ts, apps/web/src/ScenarioFiles.tsx.

it_capacity_kw is a reported IT envelope; gross path/node capacities constrain dispatch. Generator startup follows the utility asset's availability, not every downstream loss of service. Same-time event order is meaningful. The charging-enabled CLI preset and charging-disabled guided lesson must not share a claimed input identity. datacenter_twin/continuity.py, docs/canonical-case.md.

calculateScreen('releaseGate', ...) accepts six review-state strings. The generic buildScreenResult wrapper first clones numeric lesson inputs and rejects those strings. That is a documented existing wrapper limitation, not a failure of the current twelve numeric infrastructure lessons. No source repair is included in this documentation package. apps/web/src/infrastructure/screens.ts:679–717, apps/web/src/infrastructure/screens.ts:796–838.

The bundled hardware/offering/model catalog is dated provenance and explicit assumptions. It does not fetch live prices, certify a vendor claim, convert node/GPU/token billing into equivalent throughput, or supply a calibrated jurisdictional cost model. null values remain unknown. datacenter_twin/catalog.py, datacenter_twin/calculations.py.

Evidence and rights

Original software and synthetic fixtures retain Apache-2.0 terms and notices. Imported runtime/vendor materials retain their separate notices. The research adaptation identifies its supplied archive; absent originals remain absent. Infrastructure lesson labels distinguish source statements, editorial derivations, illustrative assumptions and unresolved material. The documented educational publication decision does not remove Engineering HOLD, grant new third-party rights or make the private manuscript distributable. NOTICE, docs/third-party/README.md, docs/releases/v2.0.0-publication-decision.md.

No facility measurement dataset, external independent reproduction, FAT/SAT, physical safety assessment, certification, service-level/Tier result or real equipment control is established by this audit. A later calibration project requires its own data rights, units, measurement uncertainty, validation owner and accepted use boundary. Existing public tutorials and historical evidence remain intact; the new roadmap labels such future work as conditional proposals.

Local verification limits on 19 November 2026

The author executed the standard-library suite, a declared 18-file native Node subset, the infrastructure verifier, worked CLI examples and a fresh evidence packet. The optional scientific tests also executed with available versions that differ from source pins. The installed-version check failed and is retained as a failure. Locked frontend build/typecheck, complete browser journeys, exact locked scientific reproduction and new deployment verification were not performed locally. Historical CI belongs to the pinned source, not the later documentation candidate. Dated verification ledger.

The complete canonical Git tree is byte-accounted. Source code has syntax/interface inventory and targeted semantic review; vendor, binary and historical/generated material has explicit indexed-only dispositions where deeper review was not performed. Neither a file count nor a parser success is presented as exhaustive semantic, visual or runtime verification. Independent candidate QA and integration/publication checks remain separate stages.

Canonical file: docs/math-and-physics/ASSUMPTIONS_AND_LIMITS.md · Back to guide navigation

Verification evidence ledger

Snapshot: 19 November 2026. Source: d8dc3773830a397409a7a9c00a6ffed33c46fb4b. Git tree: fde01a007a4ff05f685f88be2158b672a31c118f. This ledger separates executed local source checks, historical provider records, documentation checks and future delivery stages. It does not assign a commit or deployment identity to an uncommitted documentation candidate.

Local source execution

The source extraction contains all 711 canonical blobs and 97 directory entries. Tests ran in an isolated source copy, with generated outputs kept outside the documentation candidate. Raw commands, original timestamps, exit status and stdout/stderr digests are retained in the author handoff's numbered runtime receipts. The following times are original completion times in UTC, not dates when this page was written.

Receipt Check Original completion time Observed result and scope
DC-RUN-01 Lock-only validation 2026-11-19T21:06:58.947571+00:00 PASS; declared extras and lock files agree
DC-RUN-02 Standard-library unittest discovery 2026-11-19T21:07:32.292826+00:00 PASS; 306 discovered, 247 executed passes, 59 optional skips
DC-RUN-03 Native-test fixture preparation 2026-11-19T21:27:17.412721+00:00 PASS; two JSON fixtures, 18 presets; no full browser preparation
DC-RUN-04 Native Node subset 2026-11-19T21:27:22.354684+00:00 PASS; 132 tests in 18 files; two parse5-dependent files excluded
DC-RUN-06 Infrastructure verifier 2026-11-19T21:29:39.348611+00:00 PASS; 24 cases, 222 comparisons, 11 model families
DC-RUN-07 Fresh evidence build 2026-11-19T21:29:39.784293+00:00 PASS; 14 artifacts
DC-RUN-08 Fresh evidence verification 2026-11-19T21:29:40.199467+00:00 PASS; hashes and current-engine numerical reproduction
DC-RUN-09 Planning CLI example 2026-11-19T21:29:40.429746+00:00 PASS; baseline-1mw result
DC-RUN-10 Continuity CLI example 2026-11-19T21:29:40.697795+00:00 PASS; charging-enabled generator_failure
DC-RUN-11 Reserve sweep CLI example 2026-11-19T21:29:41.175802+00:00 PASS; 0, 50, 100 kWh in caller order
DC-RUN-12 EMT CLI example 2026-11-19T21:29:41.458730+00:00 PASS; voltage-sag, 2,001 sampled rows
DC-RUN-13 Installed-version diagnostic 2026-11-19T21:29:41.628798+00:00 FAIL / exit 1; FastAPI 0.141.1 differs from declared 0.162.2
DC-RUN-14 Supplementary research tests 2026-11-19T21:30:20.609619+00:00 PASS; 37 tests, available NumPy 2.3.5/SciPy 1.17.0
DC-RUN-15 Supplementary spectrum parity 2026-11-19T21:30:20.937094+00:00 PASS; 2 tests, available NumPy 2.3.5
DC-RUN-16 Existing notebook code cells 2026-11-19T21:49:36.354790+00:00 PASS; 8 cells/assertions; no Jupyter/rendering claim

The standard-library run used an isolated Python 3.12.14 environment without optional packages. Its 59 skips comprise 37 research tests, 6 spectrum-boundary tests, 2 spectrum-parity tests and 14 API-related tests. Later supplementary runs did not rewrite that result. The six spectrum-boundary tests and fourteen API-related tests remained unexecuted locally. The native run used Node 24.22.3; its exact 18-file list is retained in receipt04. build-security.test.ts and seo-delivery.test.ts were excluded because their parse5-dependent build pipeline was unavailable locally. Arithmetic/native tests are not browser interaction, CSS layout or TypeScript compiler checks. tests/test_research.py, tests/test_research_guards.py, tests/test_spectrum_parity.py, apps/web/package.json.

The 24-case infrastructure verifier uses independently written Python equations and Node-executed TypeScript, covering 11 lesson model families at relative 1e-11 / absolute 1e-10. Native unit tests additionally cover the other exported models. The source test labelled “seven presets” actually iterates the current 18-preset fixture; avoid treating a stale test name as a count. scripts/verify_infrastructure.py, apps/web/tests-engine/infrastructure.test.ts, apps/web/tests-engine/engine.test.ts.

All eight existing notebook code cells were executed in source order with their assertions under Python 3.12.14. The harness retained each code-cell hash and expression result. It did not start an IPython kernel, render the notebook or rewrite its saved outputs. Source notebook SHA-256 is 01b0f6cc0d1b895e4985dd532485c45532c48a126865266c06a23643892174e9. docs/examples/battery-ride-through.ipynb.

Revision binding and retained output digests

The initial 711-file manifest was retained before documentation edits. Receipt05 reconciles the source copy after runs02–04; it is explicitly a post-run reconciliation, not a retained pre-test snapshot. Runs06–16 bracket execution with before/after byte, size and Git-mode checks against that manifest. The normalized identity-list digest is cb274e6a1a1bb31e6cc3f9a9d9fe60d7a0a07b5a8a11cc7380eb0033d6fcb121. No application source changed during these runs.

Evidence SHA-256 Meaning
Standard-library stderr log f2390a6a3bf2027dab5d3c6ccb32bdda1434913cd4918252a2788532d0794df4 Original test names, skips and 306-test summary
Native subset stdout log 701c5c70288118dc7d6d194325542755ae5f82dfcbf86395f1b32c0eb27ae567 132-test execution record
Infrastructure verifier stdout 894134741176d3701faf117786b2af4f8d40d13fd4d149b8020ef9995dec5dde 24 cases / 222 comparisons
Fresh packet manifest 9c435f005764f65fcc02d8a5a2db4b9918118fccaeb0bf3b0cee0919b894228f Author-built 14-artifact packet; not a new release
Research stderr log 09478816e741f0c86b04350f2a3ab93a9e6e035693b8cec6e4d8163c4756f281 Separate 37-test supplementary run
Spectrum parity stderr log a8a93a1cb6eabce49c7be80efee5f1a728aa5daab0f49d85665c0ef1433646b4 Separate two-test supplementary run

These digests identify retained evidence; a hash alone is not a test result, authenticity signature or proof of physical accuracy. The existing packet verifier itself treats revision/environment fields as declared metadata rather than a remote checkout attestation. The author separately bound the local source files. docs/validation/evidence-method.md.

Historical exact-source GitHub evidence

At 2026-11-19 21:06:47 UTC, the read-only GitHub query for this source returned the provider's default latest set of 23 check runs: 22 success and one skipped. This was not a filter=all history of every attempt. Their executions belong to 17 November 2026, not this documentation candidate.

Workflow / check Provider reference Recorded status
Tests run 44121851395 Success for source SHA; updated 2026-11-17 16:28:11 UTC
Hardened CI run 44121851699 Success for source SHA; updated 16:08:48 UTC
Flagship dashboard run 44121852205 Success for source SHA; updated 16:06:17 UTC; separate deploy job skipped
CodeQL run 44121852380 Success for source SHA; updated 16:07:44 UTC
Browser demo / Python parity job 134177923737 Historical success; completed 16:27:48 UTC
Publish static demo job 134189960912 Historical success; completed 16:28:10 UTC; not proof of this handbook's publication

The classic branch-protection query returned 403; a ruleset list was visible but does not replace a complete effective-policy review. The Pages endpoint was unavailable through the supported connector and returned a 400 endpoint error. These failures do not prove absence of protection or absence of a site. The source contains a configured Pages publisher. Refresh policy, PR head/base and required checks at integration time. .github/workflows/tests.yml, .github/workflows/deploy-dashboard.yml, CI and release playbook.

Verification that remains distinct

  • Candidate documents: exact allowed-file diff, protected source bytes/modes, source citations, required-output navigation, MathML/HTML generation, declared CFF schema and structured handoff schemas are author-side deterministic checks. Their final identities belong in the frozen author handoff.
  • Independent candidate QA: a separate reviewer must assess the frozen candidate's science, wording, coverage, commands, privacy and roadmap. Source-only reviewer preparation does not approve an unseen candidate.
  • Locked environment and browser: local typecheck/build, both parse5-dependent tests, browser journeys, fresh visual inspection and exact locked scientific/API runs were not established by this author environment. Use correctly revision-linked CI and any required current candidate checks.
  • Merge and publication: documentation commit SHA, merged SHA, deployed artifact identity and distinctive live content are separate future observations. No author test here certifies them.
  • External scientific review: maintainer-produced artifacts and agent QA do not satisfy the project's recorded independent external reproduction goal.

No failed, skipped, historical, unavailable or pending check is relabelled as an executed candidate pass. Existing external review protocol, release readiness.

Canonical file: docs/maintainer/VERIFICATION_EVIDENCE_LEDGER.md · Back to guide navigation

CI, documentation publication and release playbook

This is a description of source d8dc3773830a397409a7a9c00a6ffed33c46fb4b and the dated metadata in the evidence ledger. Current required checks and review policy must be discovered from the actual PR/effective rules before integration. Workflow source alone does not reveal every merge requirement.

Configured providers and jobs

The complete tracked tree contains seven GitHub Actions workflow files. No CircleCI or Buildkite pipeline is configured in this source snapshot; their absence here is a repository-tree observation, not an assertion about inaccessible organization infrastructure.

Workflow Trigger / job role Publication boundary
tests.yml Main pushes, PR/merge-group/manual events; Python platform matrix, browser/Python parity, packaging/evidence and reader checks Existing guarded Publish static demo job follows the validated main route
hardened-ci.yml Main/PR/merge-group/manual and weekly schedule; five security modes and seven language-quality modes Preserves scanner diagnostics/artifacts; no site deployment
codeql.yml Main and named hardening branch, PR/merge-group/manual and weekly schedule Python and JavaScript/TypeScript analysis plus SARIF gate
deploy-dashboard.yml Companion/flagship validation Its separate deployment job is explicitly disabled; that skipped job is not the active Pages publisher
qa-audit.yml PR and manual audit Full parity/visual/performance observations; optional manual hosted crawl/hash check; no deployment
publish-pypi.yml Manual dispatch on the owner repository's main branch Requires successful exact-source push tests.yml, verifies a wheel, then uses the existing pypi environment/trusted publisher
portfolio-dashboard-check.yml Filtered guide paths on PR/main/tag events Validates the existing portfolio guide, source paths and SVG

.github/workflows/tests.yml, .github/workflows/hardened-ci.yml, .github/workflows/codeql.yml, .github/workflows/deploy-dashboard.yml, .github/workflows/qa-audit.yml, .github/workflows/publish-pypi.yml, .github/workflows/portfolio-dashboard-check.yml.

The repository's AGENTS.md requires keeping check names, Python/OS matrices, browser parity, numerical tolerances, least privilege, pinned actions and publish guards. PR cancellation is separated from manual/release/deploy execution. Runtime observations and billed usage are different measurements; no cost-saving claim follows from this audit.

Documentation candidate gate

  1. Bind the source, complete candidate tree and full diff. Check the 24 requested outputs and source/interface dispositions; preserve all protected application, model, test, dependency, license and historical evidence bytes/modes.
  2. Rebuild the handbook and run its --check; validate new Markdown links/anchors, immutable source ranges, CFF against schema 1.2.0, and machine-readable handoffs with actual date/URI validation.
  3. Have an independent reviewer assess the exact frozen candidate. Preserve the original review and any repair round; refresh the candidate identity after a repair.
  4. At PR time, identify required provider contexts, approvals, head/base revisions, merge-queue semantics and conflict state. Keep PR-head checks separate from synthetic merge/queue revisions and their mappings.
  5. Refresh those facts immediately before any guarded integration. Missing/stale/inaccessible requirements are unresolved, not passes. A branch-protection 403 must not be interpreted as permission to bypass it.

The final source-test records and candidate documentation validation belong in external execution receipts. Embedding a candidate's own commit hash into a file before that commit exists would be self-referential; record source pin inside docs and commit/merge/deploy identities afterward.

Existing GitHub Pages route

The active tests.yml path builds the static demo, creates legacy Pages entry points with scripts/build_pages_redirect.py, and then executes copytree(Path('docs'), output, dirs_exist_ok=True). Its assertions protect the companion marker and lesson configuration. The new docs/reference/index.html, CSS and chapter sources are inside that copied tree, and the existing companion links to the handbook. No new workflow, hosting service, branch or DNS setting is required. .github/workflows/tests.yml:200–219, scripts/build_pages_redirect.py.

After an authorized merge, connect the merged revision to the actual workflow run/artifact and deployment. Inspect the repository Pages route, the new reference/ page, and its distinctive source-snapshot/handbook content. Confirm that the companion's new reference link resolves. A successful old run, an HTTP 200 or the old home page does not prove these new files were deployed. Preserve the observed URL, time, deployment/artifact identity and content evidence.

Separate custom-domain publication

The canonical React course origin in apps/web/site.config.json is https://khanlab.co.technology/. The existing deployment note documents Cloudflare Pages Direct Upload, an out-of-tree Windows publisher and a Worker-managed /robots.txt route. Its dated receipts describe earlier actions; they are not new live verification. The repository's docs/ copy does not by itself prove the handbook is included in that separate custom-domain upload. apps/web/site.config.json, docs/cloudflare-pages-deployment.md.

Before a future custom-domain publication, retrieve the authorized publisher and its version, verify the exact public asset set, match build/source identity and inspect the actual route. This documentation task does not create an account, upload a new custom-domain build, change DNS or weaken a policy. If one existing route publishes and the other is unverified, report them separately.

Releases and package identity

The preserved CFF declares version 2.0.1 and release date 2026-10-26. Read-only release metadata at the audit snapshot lists v2.0.1 as latest, matching the existing receipt. The source README describes PyPI publication as pending; this audit did not independently query a current PyPI project to turn that historical statement into a live status claim. CITATION.cff, docs/releases/v2.0.1.md, docs/engineering/pypi-publication.md.

No new tag or release is part of this documentation change. For a separately authorized release, follow existing packaging and source-linked evidence rules: verify exact-source CI, build and check the actual wheel, preserve its digest/publication manifest and trusted-publisher environment, and confirm the resulting artifact. Documentation updates alone do not justify a model/version change or an archive DOI.

Failed or interrupted delivery

Reconcile the actual PR, source/head/base and remote provider state before retrying an interrupted action. Preserve prior receipts. For an in-scope documentation defect, repair and independently recheck the changed candidate. For a pre-existing required source failure, record the blocker rather than editing application tests or disabling checks. Use recovery for a missing publisher, unavailable dependency/toolchain or owner handoff.

Canonical file: docs/maintainer/CI_CD_AND_RELEASE_PLAYBOOK.md · Back to guide navigation

Toolchain and dependency matrix

The declared column comes from source d8dc3773830a397409a7a9c00a6ffed33c46fb4b. The observed column describes the authoring environment on 19 November 2026. They are separate evidence classes. The audit did not update a manifest or lockfile to make them agree.

Component Declared / configured Observed locally and implication
Python core Python ≥ 3.12; no required runtime dependencies Python 3.12.14; isolated standard-library suite and CLI examples executed
Python CI matrix 3.12/3.14, Ubuntu/Windows; macOS native-reader check Historical exact-source CI recorded; not locally emulated
Build backend setuptools 84.2.1 No new wheel/build-backend reproduction claimed
FastAPI 0.162.2 0.141.1; installed-version diagnostic failed
Uvicorn 0.54.0 0.52.1; mismatch in preflight
HTTPX test client 0.28.1 0.28.1; matching this one package is not a full locked environment
NumPy 2.5.4 2.3.5; supplementary research/spectrum execution only
SciPy 1.18.1 1.17.0; supplementary research execution only
Node Root engine constraint ^22.13.0 || >=24; contributor/CI route Node 24 24.22.3; native stripping/test subset executed
npm Lock-based npm ci --ignore-scripts 11.9.0; no new frontend installation
React / React DOM 19.3.1 / 19.3.1 Full locked application build not run locally
Vite 8.3.6 Full locked production/demo build not run locally
TypeScript, app 7.0.2 Separate available parser 5.9.3 used for syntax inventory only; no compiler/typecheck claim
TypeScript, root quality tools 6.0.3 Distinct root tooling contract; not silently substituted for app compiler
ESLint, root 10.14.0 Config/source inspected; no full local quality installation
Pyodide 314.0.7 Full browser scientific runtime not staged in this run
Playwright 1.65.0 No fresh browser journey or visual claim
parse5 8.1.1 Unavailable in the local test workspace; two dependent native test files excluded
CFF validation Declared CFF 1.2.0 schema PyYAML 6.0.3/jsonschema 4.26.0 available; cffconvert absent; direct schema validation is used
Reference handbook Python standard library + Pandoc executable Documentation-only renderer; separate from application dependencies

Sources: pyproject.toml, requirements-api.lock, requirements-studies.lock, package.json, apps/web/package.json, .github/workflows/tests.yml. Exact transitive versions remain in their lockfiles; the table does not replace them.

Reproduction order

Run scripts/check_dependency_versions.py --lock-only api test-api studies before downloads. Install the corresponding locks, then run the installed-version check with the same interpreter selected by TWIN_PYTHON. Install frontend packages with the existing lock and scripts-disabled policy. Fetch hash-pinned study wheels before full browser preparation. Run the build, native comparisons and browser tests in their documented order. Setup, existing dependency workflow.

The runtime fetcher accepts HTTPS URLs without embedded credentials, bounds wheel size and verifies SHA-256 before caching. It retries selected transient transport failures, not integrity failures. Study Python archives are verified again at the browser boundary. A vendor package version, repository source version, compiled bundle and generated evidence version must not be inferred from one another. scripts/fetch_study_runtime.py, scripts/prepare_browser_demo.py, apps/web/src/runtime-progress.ts.

Provenance and license handling

Keep Apache-2.0, NOTICE, CFF authorship and all separately licensed runtime/vendor files intact. Vendor sources and binary media are byte-accounted, with indexed-only dispositions where no semantic/visual review was performed. The existence of a vendored implementation is not a security audit or an executed compatibility test. NOTICE, docs/third-party/README.md, apps/web/public/THIRD-PARTY-NOTICES.txt.

Updating dependencies later

Treat a dependency change as its own reviewed implementation task: update manifest and appropriate lock together; run offline and installed checks; retain Python/OS, native/browser parity, research residual/refinement, packaging and security evidence. Private SciPy import/type surfaces and browser scientific wheel compatibility need particular attention. A successful run on different installed versions is useful diagnostic evidence but cannot replace the declared acceptance environment. Proposed work is listed in the roadmap.

Canonical file: docs/maintainer/TOOLCHAIN_AND_DEPENDENCY_MATRIX.md · Back to guide navigation

Failure modes and technical debt

This register distinguishes concrete source behavior from environment limits, documentation duties and future research. It is bound to source d8dc3773830a397409a7a9c00a6ffed33c46fb4b. No application repair is included in this documentation package. Proposed owners/effort and dates appear in the roadmap.

ID / class Evidence and consequence Proposed resolution / acceptance
DC-DEBT-01 — interface inconsistency Direct calculateScreen('releaseGate', states) accepts six string review states; buildScreenResult first applies numeric cloning and rejects the same input. The twelve current lessons use numeric models, so no current lesson failure is asserted. Decide whether to expose a separate typed review envelope or document the direct-only contract permanently. Any implementation repair must preserve numeric lessons and reject malformed/mixed states. Roadmap DC-N03.
DC-DEBT-02 — recovery dependency The custom-domain publishing procedure references an external Windows script not tracked here. A clone alone does not recover that publishing capability. Retrieve/version or deliberately document the authorized publisher and artifact allowlist without exposing credentials. Reproduce from an independently prepared environment. DC-N04.
DC-DEBT-03 — verification environment gap Local FastAPI/NumPy/SciPy versions differ from source pins. Core skips and the installed-version FAIL are retained. Repeat applicable locked checks on exact candidate/release source and retain source/environment identities; do not relax pins. DC-N02.
DC-DEBT-04 — parser contract decision Python rejects duplicate keys; native JSON.parse paths do not make that guarantee. File-read and request-envelope limits also differ intentionally. Define the desired raw JSON acceptance contract and add focused equivalent invalid-input tests if unification is chosen. Document current behavior until then. DC-X02.
DC-DEBT-05 — scientific evidence gap Adapted research lacks the original MATLAB files and measured GPU trace. Current tests are numerical/software checks. Seek only authorized originals/data and define a comparison/uncertainty protocol; do not fabricate equivalence. Conditional DC-H01.
DC-DEBT-06 — external review gap The existing protocol records independent review as not obtained; author packets and agent QA are different evidence. Obtain an attributable, scoped outside reproduction and resolve reproduced discrepancies. DC-X01.
DC-DEBT-07 — bounded discovery summary seo.ts intentionally summarizes infrastructure introductions/HOLD to keep llms-full.txt under 60 KiB. Growth can exceed the limit or weaken useful discovery. Preserve page coverage and HOLD, test byte budget and links when the catalog changes; redesign summary selection only from a measured need. DC-X04.
DC-DEBT-08 — dependency compatibility Research imports NumPy/SciPy numerical and typing surfaces, including an internal SciPy type path. Browser wheels are separately locked. In a planned dependency update, verify import/solver contracts and wheel compatibility across the existing matrix. DC-L02.
DC-DEBT-09 — physical-use boundary Teaching screens and synthetic continuity do not establish equipment suitability, reliability probabilities or calibration. Keep Engineering HOLD and limits. Any future measured-use effort needs data rights, bases, uncertainty and an agreed validation owner before model work. DC-H01.
DC-DEBT-10 — delivery evidence pending Historical source CI and an old deployment are not candidate/merge/publication evidence. Policy queries can be inaccessible. Refresh exact head/base, required checks/reviews and deployment artifact/content identity; stop at a real blocked boundary. DC-N01.

Source locators: apps/web/src/infrastructure/screens.ts:679–717, apps/web/src/infrastructure/screens.ts:796–838, docs/cloudflare-pages-deployment.md, datacenter_twin/contracts.py, apps/web/src/javascript-worker.ts, datacenter_twin/research/grid_network.py:1–8, docs/validation/review-protocol.md, apps/web/seo.ts:664–685, datacenter_twin/research/sdcib.py:8–12, .github/workflows/tests.yml.

Operational failures worth retaining

Numerical failures must preserve study/configuration and actual diagnostics. Nonconvergence, a nonfinite result, a conditioning guard or an invalid event graph must not turn into a zero-filled “successful” report. Runtime download integrity failure is terminal for that artifact. A worker timeout can reject multiple pending requests, so retain the failed operation ID and applied configuration. Unknown rates remain unknown. datacenter_twin/research/sdcib.py, datacenter_twin/research/grid_network.py, apps/web/src/worker-request.ts, scripts/fetch_study_runtime.py, datacenter_twin/catalog.py.

Marker extraction found one substantive source shortcut note in apps/web/seo.ts:664. The crawler's variable named todo and a test title containing “shortcut” are not automatically defect tickets. Marker counts are a discovery aid, not a complete debt assessment or a substitute for the source-located findings above.

Evidence priority

Address reproducibility and contract ambiguity before enlarging the scientific domain. Keep fixes that alter execution out of a documentation-only diff. If a later finding affects a required release gate, label that gate blocked and retain the failing receipt; a pre-existing defect does not become acceptable merely because documentation was the current task.

Canonical file: docs/maintainer/FAILURE_MODES_AND_TECH_DEBT.md · Back to guide navigation

Documentation maintenance runbook

The Markdown files are the reference source; docs/reference/index.html is a generated reading view. Existing tutorials, contracts, historical release packets and native lesson material remain canonical for their own scopes. Start at INDEX.md before adding a second explanation of the same behavior.

When a source change needs documentation work

Change Update together Evidence to retain
Contract/CLI/HTTP/worker change Interface guide, setup, relevant existing contract and error examples Exact source pin, parser/route/argument declarations and focused compatibility checks
Equation, unit, sign, default or solver change All three science chapters, worked example and affected lesson/source notes Independent arithmetic or appropriate convergence/residual comparison, not only a changed snapshot
Dependency/toolchain change Matrix, setup and existing dependency guide Manifest/lock checks plus installed-version and platform/runtime results
Course/catalog change Course registry, discovery material and documentation counts Registry --check, unique IDs/sequence and working reading/runtime routes
Release/publication change Changelog/CFF only when historically justified; release playbook and recovery Actual tag/artifact/merge/deployment identity and dated provider receipt
New evidence or repaired failure Verification ledger and affected roadmap item Original and new results with different timestamps/revisions kept distinct

scripts/sync_course_registry.mjs, scripts/check_dependency_versions.py, docs/validation/evidence-method.md, CITATION.cff.

Update the handbook deliberately

The chapter manifest lists the 24 required canonical paths and their reading order. The renderer uses Pandoc GFM/MathML, namespaces chapter anchors and rewrites source links. Local images within the published docs tree retain their relative image route; remote/unpublished images become readable source links/text. An already-linked image must not produce nested anchors. This preserves a restrictive content policy without adding remote image hosts or application dependencies.

python docs/reference/build_reference.py
python docs/reference/build_reference.py --check

Check the generated file together with its inputs, manifest, CSS and renderer. Keep the new companion reference link outside its existing hashed inline script/style blocks; changing executable bytes would require an independently reviewed CSP/build change. The renderer does not execute the scientific examples or verify a live site.

Review and validation sequence

  1. Record the exact source revision/tree and complete file inventory. Inventory binary/vendor/generated items honestly; indexing is not semantic review or execution.
  2. Review affected implementations and public boundaries. Keep immutable source citations and claim types: implemented behavior, declared configuration, observed execution, inference or proposal.
  3. Update relevant canonical docs and regenerate HTML. Check new relative links/anchors, tables, code fences, MathML, navigation, input hashes and source-locator ranges.
  4. Validate CFF against its declared schema while preserving known author/release/license facts. A schema pass does not attest an invented DOI, author or release.
  5. Run only applicable meaningful commands in an isolated environment. Record source/candidate identity, command, versions, exit, log digest, timestamp and limits. Preserve skips and failed diagnostics.
  6. Review the entire diff and protected bytes/modes. Obtain independent QA bound to the frozen candidate. Keep any prior candidate and review as history before repair.
  7. After integration, verify the actual existing publishing route and distinctive changed content. Record merge/publication separately and refresh the dated ledger in a later change if appropriate.

The author handoff contains six schema-validated reports and exact tree/diff manifests; independent QA is a seventh, separate report. External run records can contain final candidate/merge hashes without forcing self-referential content into the commit itself.

Preserve historical evidence and limits

Do not overwrite release evidence under data/evidence/ to make a current run pass. Create a fresh directory below outputs/, retain its manifest digest separately, and verify reproduction. Do not relabel a screenshot, parser result, old CI check or source-only review as current browser/candidate/deployment verification. The roadmap is rolling planning: preserve stable IDs and close items with measurable evidence rather than deleting their history. Evidence ledger, roadmap.

Canonical file: docs/maintainer/DOCS_MAINTENANCE_RUNBOOK.md · Back to guide navigation

ADR index and observed architectural decisions

This index distinguishes observed decisions already embodied in source from proposals requiring a later decision. It does not invent past meeting dates, approvals or a historical ADR series. Baseline: d8dc3773830a397409a7a9c00a6ffed33c46fb4b, inspected 19 November 2026.

ID Status and decision Evidence / consequence
DC-ADR-OBS-01 Observed: keep planning and continuity as separate schemas/models engine.py estimates assumed-PUE demand; continuity.py dispatches aggregate electrical flow. Neither silently infers the other's state. datacenter_twin/engine.py, datacenter_twin/topology.py
DC-ADR-OBS-02 Observed: exact continuity accounting with deterministic input identity Fractions/BigInt rational arithmetic and canonical JSON permit detailed Python/native comparison; finite export precision remains explicit. datacenter_twin/continuity.py, apps/web/src/js-engine/canonical.ts
DC-ADR-OBS-03 Observed: local default computation and optional scientific verification/runtime Worker routes are fixed; the ordinary result does not require a shared simulation backend. Python comparison and research are loaded separately. apps/web/src/javascript-worker.ts, apps/web/src/research/runtime-worker.ts
DC-ADR-OBS-04 Observed: preserve model-family and engineering boundaries Infrastructure screens, ideal EMT and adapted dynamics have distinct contracts; educational publication retains Engineering HOLD. docs/releases/v2.0.0-publication-decision.md, datacenter_twin/emt.py
DC-ADR-OBS-05 Observed: immutable historical evidence plus fresh reproduction Packet hashes and regenerated deterministic content are checked separately; prior release artifacts remain historical. scripts/build_evidence.py, docs/validation/evidence-method.md
DC-ADR-OBS-06 Observed: two distinct publication mechanisms GitHub Pages copies docs after legacy redirects; the canonical custom domain uses documented Direct Upload with external tooling. .github/workflows/tests.yml:200–219, docs/cloudflare-pages-deployment.md
DC-ADR-PROP-01 Proposed: resolve the state-review wrapper contract Choose a separate typed envelope or a documented direct-only API without weakening numeric lesson input guards. Roadmap DC-N03.
DC-ADR-PROP-02 Proposed: make owner recovery of the custom-domain publisher reproducible Decide what authorized tooling/provenance can be versioned and how credentials remain outside source. Roadmap DC-N04.
DC-ADR-PROP-03 Proposed: decide raw JSON equivalence across Python/browser entry paths Define duplicate-key and envelope behavior before changing validators. Roadmap DC-X02.
DC-ADR-PROP-04 Conditional: measured-use or archive expansion Requires data rights/uncertainty/owner or actual archive account/metadata; no new capability or DOI is approved here. Roadmap DC-H01/DC-H02.

For a future decision record, retain context, considered alternatives, accepted boundary, owner/reviewer, source/evidence and consequences. Give an acceptance date only when a real decision is made. Implementation/test completion and independent engineering approval are separate events. Governance, twelve-month roadmap.

Canonical file: docs/owner/ADR/ADR-0000-INDEX.md · Back to guide navigation

Governance and scope

Datacenter Twin Lab is a synthetic teaching and research project. The preserved citation names Mohammad Rezwan Khan and version 2.0.1, released 2026-10-26. Original code/fixtures retain Apache-2.0 terms and NOTICE; separate runtime/vendor and source-material rights remain in force. This page records responsibilities and proposed review roles without inventing staffing, service commitments or external approvals. CITATION.cff, LICENSE, NOTICE.

Scope decisions

The repository supports local planning, aggregate continuity, bounded educational infrastructure screens, an ideal EMT lesson and five adapted dynamics studies. It supplies explicit inputs, labels, hashes, exports and software verification. It does not supply a facility-control system, multi-tenant service, live telemetry pipeline, calibrated reliability result or equipment-selection authority. Infrastructure educational publication retains Engineering HOLD. Implemented model limits, docs/releases/v2.0.0-publication-decision.md.

The present documentation task updates explanations, traceability, navigation and maintenance/recovery planning. It preserves application/science/test/workflow/dependency/license behavior and historical evidence. A roadmap item is a proposal for later scoped work, not authorization to implement a new model or operational service now.

Responsibilities for future work

Responsibility Suggested role Evidence owed
Product/source scope, rights and release decision Repository owner/maintainer Explicit boundary, available rights and real release decision
Numerical change Domain analyst plus implementation maintainer Equations, units, assumptions, accepted input domain and appropriate independent checks
Browser/contract change Application maintainer Input/result-state behavior, parity/error cases and actual browser evidence
Documentation change Documentation maintainer Canonical-source mapping, reproducible commands and accurate evidence dates
Candidate acceptance Reviewer independent of that authorship Frozen revision/tree, full diff, findings and recheck receipts
Merge/publication Authorized integration owner Current policy, exact head/base/checks, guarded integration and actual deployment content
External reproduction Attributed outside reviewer Independent environment, protocol, result and clearly bounded conclusion

These are roles, not claims that new people have accepted them. Author checks and agent QA must not be presented as the existing project's sought independent external review. docs/validation/review-protocol.md, AGENTS.md.

Decisions that require a new contract

Before using measured data, establish permission, provenance, units/bases, uncertainty, representative conditions and validation responsibility. Before a shared service, define authentication/authorization, isolation, persistence and abuse boundaries. Before a physical connection, define a separate engineering/safety/control scope. Before depositing an archive, verify the real account, artifact and metadata; do not invent a DOI or endorsement. These remain conditional planning boundaries, not supplied capabilities.

Keep provenance inspectable

Changes should preserve source locators, versioned historical assets and precise claim classes. Cite the exact configuration/source used; a moving branch or current badge is insufficient for an old result. Retain unresolved findings and failures rather than smoothing them into a “green” status. Use the existing contribution, support and security routes without adding fabricated response promises. CONTRIBUTING, SUPPORT, SECURITY, ADR index.

Canonical file: docs/owner/GOVERNANCE_AND_SCOPE.md · Back to guide navigation

Bus-factor recovery runbook

The goal is to recover an inspectable source/toolchain/evidence state before attempting publication. This runbook uses the reviewed source d8dc3773830a397409a7a9c00a6ffed33c46fb4b and tree fde01a007a4ff05f685f88be2158b672a31c118f. An old snapshot is a recovery anchor, not an instruction to overwrite a newer branch.

1. Re-establish repository identity and authority

Read the actual default branch, current head, PR state, effective rules and owner permissions. Preserve any uncommitted work and historical receipts. Use a separate checkout for investigation; verify its commit and tree before running commands. An inaccessible protection endpoint does not prove the branch is unprotected. Keep an old source anchor and a current integration candidate distinct. CI playbook.

git clone https://github.com/mohammadrezwankhan/datacenter-twin-lab.git
cd datacenter-twin-lab
git checkout d8dc3773830a397409a7a9c00a6ffed33c46fb4b
git rev-parse HEAD
git rev-parse 'HEAD^{tree}'

The recorded tree accounts for 711 blobs and 97 directory entries, with no submodule or symlink entries in that snapshot. Compare actual bytes/modes to a trusted retained manifest rather than assuming an archive extraction preserved everything.

2. Recover the local calculation path

Read AGENTS.md, pyproject.toml, the lockfiles and the existing quickstart. Create a new Python 3.12+ environment and reproduce the dependency-free CLI/standard-library suite first. Then run offline lock checks, install authorized locked extras and run installed-version checks. Keep TWIN_PYTHON consistent for Node helpers. A preinstalled environment with similar versions is not a recovered locked environment. Setup, AGENTS.md, scripts/check_dependency_versions.py.

Rebuild the local dashboard from its lock if needed; a missing bundle should produce the existing build-required response rather than a fabricated successful UI. Recover optional Pyodide study assets only through the hash-verified staging process. Preserve third-party notices and the owner's original scope statements.

3. Recover evidence without rewriting history

Use versioned data/evidence/ packets and indexes as historical records. Copy them for inspection if necessary; do not regenerate in place. Build into a fresh directory below outputs/, verify file hashes and numerical reproduction, and retain the printed manifest digest outside the packet. A changed receipt/environment field must not erase original evidence. scripts/build_evidence.py, docs/validation/evidence-method.md.

Start with the battery example, the charging/no-charging contrast and a path-capacity case. Check that stored-energy signs, gross-versus-served power and event ordering match the source. For scientific studies retain the archive provenance and absence of original MATLAB/measurement inputs. The source does not contain a recovery copy of those absent materials. Worked labs, assumptions.

4. Recover documentation and navigation

Use a documentation checkout that contains this package; the pinned source-only checkout in step 1 predates these added files. Record the actual documentation revision separately. The canonical entry is docs/INDEX.md. Rebuild docs/reference/index.html from its chapter manifest with Python and Pandoc, then use --check. Confirm its source pin, local links and the companion's reference link. Do not alter the companion's inline model/configuration, hashed styles/scripts or CSP to solve a documentation-link problem.

The existing Pages path copies docs/ after redirect staging, so verify the exact artifact includes reference/index.html and its CSS. Preserve the workflow's companion/config assertions and main-branch guard. .github/workflows/tests.yml:200–219.

5. Recover the separate custom-domain publisher

The documented custom-domain route is Cloudflare Pages Direct Upload. Its Windows publisher is referenced outside the repository. Retrieve the authorized script/version and its dependency/configuration record from the owner; a clone cannot reconstruct an absent external script. Credential names may be documented, but values belong in the existing secure credential mechanism. Do not paste credentials into a recovery document, repository or public issue. docs/cloudflare-pages-deployment.md.

Confirm the exact staged public asset set and source/build identity before a separately authorized upload. The /robots.txt route also has an existing Worker dependency. Reconcile actual deployment/account/route state before retrying an interrupted upload. Do not infer a custom-domain publication from a GitHub Pages success or create replacement hosting/DNS to hide an unavailable path.

6. Hand over a reviewable state

Retain source/candidate/merge/deploy identities, environment and command logs, protected-file comparison, full diff, open findings and next actions. Obtain independent review of the candidate and current required provider checks. Report a blocked boundary precisely when an owner-controlled credential, policy or missing publisher prevents continuation. A recovered local CLI is valuable but does not constitute a completed release, restored live service or facility validation.

Canonical file: docs/owner/BUS_FACTOR_RECOVERY_RUNBOOK.md · Back to guide navigation

Public portfolio integration contract

This document describes this public repository only, at source d8dc3773830a397409a7a9c00a6ffed33c46fb4b. It supplies a clear interface for a portfolio index without inferring unobserved cross-repository dependencies or publishing unrelated repository information.

What a portfolio consumer may summarize

Public artifact Safe summary Qualification to retain
Repository/CFF Project title, known author, Apache-2.0 software metadata, version 2.0.1 Exact source/release used; no invented DOI or archive endorsement
Model inventory Planning, continuity, bounded infrastructure screens, EMT and five dynamics studies Separate assumptions/units and synthetic or adapted provenance
Course catalog 24 course lessons, with one EMT and five dynamics learning items in discovery Eighteen presets and the four-module companion are different inventories
Evidence ledger Dated commands, source SHA, result, scope and limitations Preserve skips, installed-version failure and historical CI dates
Roadmap Stable proposed IDs, dependencies, acceptance and verification Proposed dates/roles/effort; not delivered features or staffing commitments
Publication record An actually observed merged/deployed identity and URL Repository Markdown, GitHub Pages and custom-domain publication are separate outcomes

CITATION.cff, apps/web/src/curriculum.ts, apps/web/learn-manifest.ts, verification ledger, roadmap.

Data exchange boundaries

Schema 1 planning inputs/results and schema 2 continuity scenarios/runs have distinct shapes. Continuity output uses decimal text, elapsed seconds, kW/kWh and positive source delivery with signed stored-energy change. EMT output uses floating SI quantities and signed source current/energy. Dynamics output uses normalized states, solver diagnostics and study-specific units. Infrastructure screens carry units, evidence metadata and explicit noncertification/HOLD semantics. An aggregator must preserve these labels rather than align fields by similar names alone. Interface contracts, symbol glossary.

The existing data exports and citations are confirmed integration surfaces. No runtime import, shared database, orchestrated control loop, common calibration dataset or cross-repository execution dependency is established by this documentation review. Reuse should begin with an explicit adapter contract, unit/sign mapping, provenance and a small reproducible fixture, not an assumed integration.

Status exchange

Publish content readiness, independent QA, remote checks, merge and deployment as separate dated fields. Source tests do not become candidate tests by renaming the revision. A historical badge or reachable home page is not evidence that a new handbook is deployed. Keep the final commit/deployment receipts outside the self-referential document they identify, or add an accurately dated later update.

Suggested shared work

Generic lessons from this package include accountable tree/interface dispositions, explicit scientific units, deterministic evidence identities and independent candidate review. A portfolio coordinator may deduplicate those methods while retaining repository-specific equations, claims and execution limits. The roadmap contains no asserted dependency on another repository; suggested shared review tooling is organizational reuse, not an installed software integration.

Canonical file: docs/owner/PORTFOLIO_INTEGRATION.md · Back to guide navigation