Skip to content

WF-0154 - E-Brake: Observed Absurdity Fixes #267

Description

@flyingrobots

Goalpost

Emergency-brake cycle fixing the absurdities surfaced by the 2026-07-12 forensic audit. Four slices, each with a RED-first witness; the Echo WASM bet and the causal-undo family are explicitly out of scope.

Slices

  1. Wire undo/redo as causal counter-edits. undo()/redo() are fully implemented at src/app/workspace/editor-editing-helpers.ts:221-261 with zero callers, while src/ui/help.ts:25 advertises u ctrl+r undo, redo. Wire normal-mode keys, route the restoring delta through the production text session as an authored counter-edit, register provenance so :why explains it. Opt-in JEDIT_UNDO=1, flip default when the witness is green, update BEARING's 'intentionally unsupported' line.
  2. Freeze the title screen. src/ui/title-screen.ts is the highest-churn file in the repo (55 commits). Leash-lane entry with explicit unfreeze trigger + changed-shards guard failing plans that touch frozen title paths without a title-unfreeze label.
  3. Fix order-dependent root identity. Module-global let nextRootId = 1 at src/domain/text-edit-contract.ts:49 makes HeadId/RootNodeId depend on process-wide buffer-creation order. Per-runtime allocator; re-rank and close docs/method/backlog/bad-code/global-next-root-id-counter.md.
  4. Doc truth. Governance spec asserting every src/**/scripts/** path referenced by top-level guides exists (RED today: ADVANCED_GUIDE.md:14,41,91 point at a 13-line dispatcher and a deleted adapter). Rewrite ADVANCED_GUIDE around the real map, fix GUIDE's stale npm run check description, clarify README's 'production path is Echo-hosted' to name the in-process contract posture.

Design doc: docs/design/0153-e-brake-absurdity-fixes.md (kickoff PR to follow).

Activity

  1. coderabbitai commented on Jul 13, 2026

    @coderabbitai
    🔗 Related PRs

    #23 - feat(echo): add Echo release gate witness [closed]
    #27 - feat(echo): wire trusted runtime lifecycle into jedit [closed]
    #152 - Add editor trust and strand worldline UX [merged]
    #193 - docs: lock Jim roadmap evidence slices [merged]
    #205 - Document graph-backed rope runtime gate [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. added
    causal-ropeCausal rope text authority roadmap
    enhancementNew feature or request
    goalpostRoadmap milestone tracker
    sliceImplementable roadmap slice
    text-authorityText authority and storage invariants
    on Jul 13, 2026
  3. changed the title [-]WF-0153 - E-Brake: Observed Absurdity Fixes[/-] [+]WF-0154 - E-Brake: Observed Absurdity Fixes[/+] on Jul 13, 2026
  4. flyingrobots commented on Jul 13, 2026

    @flyingrobots
    OwnerAuthor

    Correction to the issue body (slice 1 premise was wrong).

    Review falsification on PR #268 disproved the audit claim that undo/redo is unwired. Verified truth: u/ctrl+r are mapped (src/app/workspace/editor-editing.ts:95-96), and viewer-key.ts routes the history transition through planWorkspaceTextReplaceTransition into the production text session (landed in f7a96fce, PR #66). Spec-proven green: spec/workspace-text-boundaries.spec.mjs — 'production undo and redo submit Echo replacement edits' and 'production insert-mode edits can be undone through Echo'.

    The stale artifact was docs/BEARING.md's 'intentionally unsupported' line, now corrected. Slice 1 is rescoped: name undo/redo settlements as reversals in provenance (today they land as anonymous replacements — no undo command kind exists in command-provenance.ts), so :why and history surfaces can explain a reversal.

    Also from review: cycle renumbered WF-0153 → WF-0154 (0153 taken on main by the generic projection review payload viewer); title-freeze globs expanded to cover all five title path roots (src/ui/title-*, src/app/title-*, src/app/workspace/title-*, src/adapters/title-* + raytracer-profiler.ts, scripts/title-*, src/ui/*.obj); doc-path witness widened to fenced-code and plain-prose references.

    Slice 3 (root-id determinism) has landed on the cycle branch: chain-threaded nextRootId value state, RED-first witness spec/root-identity-determinism.spec.mjs, full npm run check green.

  5. flyingrobots commented on Jul 13, 2026

    @flyingrobots
    OwnerAuthor

    PR #268 merged to main (0173dba8) with slices 2, 3, and 4 complete:

    • Slice 3 — root-id determinism: process-global nextRootId removed; explicit ids + chain-threaded nextRootId value state on TickAdmissionState/HotTextBufferState; admitReplaceRangeTick is the single allocation authority. Witness: spec/root-identity-determinism.spec.mjs (RED against the counter, GREEN after). Bad-code entry resolved.
    • Slice 2 — title freeze: scripts/ci/frozen-paths.mjs + --enforce-frozen in the plan step, PR-events-only so labeled merges can't brick main; leash entry with deletion trigger. Witness: spec/ci-frozen-paths.spec.mjs; CLI exits 1 on a historical title-only diff.
    • Slice 4 — doc truth: spec/guide-path-references.spec.mjs (fenced-code + plain-prose coverage; RED on ADVANCED_GUIDE.md:91), ADVANCED_GUIDE pre-split mythology corrected, GUIDE check decomposition fixed, README Echo-hosted posture named, stale BEARING undo claim retired.

    Full npm run check green; all CI shards green. Merge used admin override solely past the CodeRabbit prepaid-credits-exhausted check (all real checks passing).

    Remaining: Slice 1 (undo/redo provenance naming) → #269, with the verified seam map. This issue stays open until #269 lands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    causal-ropeCausal rope text authority roadmapenhancementNew feature or requestgoalpostRoadmap milestone trackersliceImplementable roadmap slicetext-authorityText authority and storage invariantswork-in-progressCycle or PR is intentionally in progress and not ready to merge

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions