Skip to content

Docs: lock runtime truth standards#644

Merged
flyingrobots merged 3 commits into
mainfrom
runtime-truth-standards
Jun 6, 2026
Merged

Docs: lock runtime truth standards#644
flyingrobots merged 3 commits into
mainfrom
runtime-truth-standards

Conversation

@flyingrobots

@flyingrobots flyingrobots commented Jun 6, 2026

Copy link
Copy Markdown
Member

Summary

  • Make Runtime Truth a binding source-of-authority rule in the TypeScript/system policy docs.
  • Lock mandatory dependency injection and boundary-only encoding/decoding into AGENTS and anti-sludge guidance.
  • Record the git-warp-specific adaptation as Decision 6.

Issue

Refs #555

Test plan

  • npm run lint:md
  • npm run lint:md:code
  • git diff --check
  • commit hook: IRONCLAD M9 type policy gate
  • pre-push hook: IRONCLAD M9 static gates
  • pre-push hook: npm run test:local, 544 files / 7151 tests passed

ADR checks

  • This PR does not implement ADR 2 without satisfying ADR 3
  • If this PR touches persisted op formats, I linked the ADR 3 readiness issue. Not applicable: docs-only standards update.
  • If this PR touches wire compatibility, I confirmed canonical-only ops are still rejected on the wire pre-cutover. Not applicable: docs-only standards update.
  • If this PR touches schema constants, I confirmed patch and checkpoint namespaces remain distinct. Not applicable: docs-only standards update.

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@flyingrobots, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 41 minutes and 59 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4d47a6c4-c393-421d-9ec6-dbd278617cc3

📥 Commits

Reviewing files that changed from the base of the PR and between a908e7d and ce5df84.

📒 Files selected for processing (3)
  • AGENTS.md
  • docs/ANTI_SLUDGE_DECISIONS.md
  • docs/SYSTEMS_STYLE_TYPESCRIPT.md
📝 Walkthrough

Walkthrough

This pull request codifies the Runtime Truth standard across four documentation files, establishing Rule 0 as binding doctrine, formalizing Decision 6 in anti-sludge policy, and detailing architectural rules for dependency injection, core construction constraints, boundary validation, and domain modeling patterns.

Changes

Runtime Truth Standard Documentation

Layer / File(s) Summary
Rule 0: Runtime truth as binding doctrine
AGENTS.md, SYSTEMS_STYLE_TYPESCRIPT.md, docs/ANTI_SLUDGE_POLICY.md
Rule 0 declares runtime behavior as the authoritative source when documentation, types, or tests disagree, requiring the runtime model to be fixed first and supporting artifacts updated accordingly.
Decision 6 formalization and policy commitment
docs/ANTI_SLUDGE_DECISIONS.md
The Runtime Truth standard is formalized as Decision 6 in anti-sludge binding decisions with detailed repository-specific rules, and the 2026-06-06 revision history entry records its lock-in to policy.
Dependency injection and core construction constraints
AGENTS.md, docs/ANTI_SLUDGE_POLICY.md, docs/SYSTEMS_STYLE_TYPESCRIPT.md
Mandatory dependency injection in core requires constructor-injected ports only; core is prohibited from constructing adapters, host APIs, persistence, wall clocks, or entropy sources; core may construct validated domain objects.
Boundary discipline: validation and encoding/decoding placement
docs/ANTI_SLUDGE_POLICY.md
Encoding/decoding and validation must occur at boundaries before domain logic branches; core may only branch on validated runtime-backed domain objects; named boundary reader modules may convert checkpoint/index data into domain values.
Preferred patterns and runtime honesty verification
docs/ANTI_SLUDGE_POLICY.md, docs/SYSTEMS_STYLE_TYPESCRIPT.md
Establishes runtime-backed domain classes and pure domain functions as preferred patterns; review guidance is updated to verify that code branches on typed errors rather than parsing error messages.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A rabbit hops through doctrine clear,
Rule Zero whispers: "Runtime's here!"
No phantom ports, just honest code,
Boundaries guard the righteous road.
Truth first, then types—we've learned the art!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Docs: lock runtime truth standards' accurately summarizes the main change: documenting and enforcing Runtime Truth as binding doctrine across TypeScript and anti-sludge policy documents.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The pull request description includes all required sections: a clear summary of changes, a reference to issue #555, comprehensive test plan details, and completed ADR checks.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch runtime-truth-standards

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Release Preflight

  • package version: 18.0.0
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If you tag this commit as v18.0.0, release workflow will publish.

@flyingrobots

Copy link
Copy Markdown
Member Author

@codex Self-code-review findings discovered during local review of origin/main...HEAD; fixes are committed in 0f02f253.

Severity File Evidence Infraction Mitigation
P2 docs/SYSTEMS_STYLE_TYPESCRIPT.md Pre-fix a908e7db, line 78: global No unknown; conflicts with docs/ANTI_SLUDGE_DECISIONS.md lines 138-140, which make unknown boundary-only. Standards contradiction Clarify that unknown is banned outside boundary parser implementations and never reaches core/public APIs.
P4 docs/SYSTEMS_STYLE_TYPESCRIPT.md Pre-fix a908e7db, line 98: throw new TypeError(...) in a recommended sample while git-warp bans raw domain TypeError. Example undermines policy Replace with a typed boundary/domain error example.
P5 docs/SYSTEMS_STYLE_TYPESCRIPT.md Pre-fix a908e7db, line 293: unprofessional comment in the err.message anti-example. Markdown/code-sample style Replace with neutral wording: message parsing is not a contract.

Deterministic reproduction commands:

git show a908e7db:docs/SYSTEMS_STYLE_TYPESCRIPT.md | nl -ba | sed -n "74,100p"
git show a908e7db:docs/SYSTEMS_STYLE_TYPESCRIPT.md | nl -ba | sed -n "288,296p"
git show a908e7db:docs/ANTI_SLUDGE_DECISIONS.md | nl -ba | sed -n "136,140p"

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Release Preflight

  • package version: 18.0.0
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If you tag this commit as v18.0.0, release workflow will publish.

@flyingrobots

Copy link
Copy Markdown
Member Author

@codex Code Lawyer follow-up finding from the post-wait audit; fix is committed in ce5df84a.

Severity File Evidence Infraction Mitigation
P2 docs/SYSTEMS_STYLE_TYPESCRIPT.md, docs/ANTI_SLUDGE_DECISIONS.md, AGENTS.md Pre-fix 0f02f253: SSTS still allowed unknown in parser/boundary-reader language and carried examples with unknown, as, and Record<symbol, unknown> while AGENTS/policy enforce unknown outside adapters as rejection. Standards contradiction / unenforceable exception wording Tighten unknown to adapter-owned boundary parser implementations, remove contradictory cross-realm branding sample, remove as const recommendation, and align AGENTS/Decision 6 with the adapter-only enforcement contract.

Deterministic reproduction commands:

git show 0f02f253:docs/SYSTEMS_STYLE_TYPESCRIPT.md | nl -ba | sed -n "72,84p"
git show 0f02f253:docs/SYSTEMS_STYLE_TYPESCRIPT.md | nl -ba | sed -n "368,388p"
git show 0f02f253:docs/SYSTEMS_STYLE_TYPESCRIPT.md | nl -ba | sed -n "402,418p"
git show 0f02f253:docs/ANTI_SLUDGE_DECISIONS.md | nl -ba | sed -n "136,140p"
git show 0f02f253:AGENTS.md | nl -ba | sed -n "162,168p"

@flyingrobots

Copy link
Copy Markdown
Member Author

Code Lawyer Activity Summary

@codex Consolidated audit results for PR #644 after self-review, fixes, push, 180-second wait, and Code Lawyer pass.

Source Severity File / Surface Issue Fix / Outcome Commit
Self-review P2 docs/SYSTEMS_STYLE_TYPESCRIPT.md Global No unknown wording contradicted Decision 6 boundary-only language. Reworded to boundary parser rule and kept unknown out of core/public APIs. 0f02f253
Self-review P4 docs/SYSTEMS_STYLE_TYPESCRIPT.md Recommended sample used raw TypeError while policy bans raw domain TypeError. Replaced with typed boundary/domain error example. 0f02f253
Self-review P5 docs/SYSTEMS_STYLE_TYPESCRIPT.md err.message anti-example carried unprofessional wording. Replaced with neutral policy wording. 0f02f253
Code Lawyer P2 SSTS / Decision 6 / AGENTS Boundary parser wording still implied broader unknown exceptions than the adapter-only enforcement rule; SSTS also carried contradictory unknown/as/Record<symbol, unknown> examples. Tightened to adapter-owned boundary parsers, removed contradictory cross-realm branding sample, removed as const recommendation, aligned AGENTS and Decision 6. ce5df84a
Code Lawyer P3 PR body CodeRabbit pre-merge checks warned that ADR checks were missing. Updated PR body with Issue, Test plan, and ADR checks sections from the template. PR metadata edit

Validation evidence:

  • npm run lint:md passed
  • npm run lint:md:code passed
  • git diff --check passed
  • commit hooks passed IRONCLAD M9 type policy gate
  • pre-push hooks passed static gates
  • pre-push hooks passed npm run test:local: 544 files / 7151 tests
  • GraphQL review-thread query returned zero review threads

Current caveat: latest push ce5df84a restarted GitHub CI, so merge gate remains locked until the pending checks finish.

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

Release Preflight

  • package version: 18.0.0
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If you tag this commit as v18.0.0, release workflow will publish.

@flyingrobots flyingrobots merged commit 615772d into main Jun 6, 2026
17 checks passed
@flyingrobots flyingrobots deleted the runtime-truth-standards branch June 6, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant