Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conductor/tracks.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ Canonical status is evidence-gated by [programme-state.json](./programme-state.j
- [x] **T18-02 Metadata duplication transport regression matrix** ([#544](https://github.com/edithatogo/substack-cli-ts/issues/544)) ([evidence](./archive/T18-02/index.md))

## P19 Published-post editor compatibility ([#554](https://github.com/edithatogo/substack-cli-ts/issues/554))
- [ ] **T19-01 Published-post editor schema compatibility and crash containment** ([#550](https://github.com/edithatogo/substack-cli-ts/issues/550)) ([plan](./tracks/T19-01/index.md))
- [x] **T19-01 Published-post editor schema compatibility and crash containment** ([#550](https://github.com/edithatogo/substack-cli-ts/issues/550)) ([evidence](./tracks/T19-01/index.md))
3 changes: 2 additions & 1 deletion conductor/tracks/T19-01/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
- [Requirements](./requirements.md)
- [Design options](./design.md)
- [Risks and contingencies](./risks.md)
- [Verification](./verification.md)
- [Metadata](./metadata.json)
- [GitHub issue #550](https://github.com/edithatogo/substack-cli-ts/issues/550)
- Parent phase: [P19 #554](https://github.com/edithatogo/substack-cli-ts/issues/554)
- Plan phases: [#555](https://github.com/edithatogo/substack-cli-ts/issues/555), [#556](https://github.com/edithatogo/substack-cli-ts/issues/556), [#557](https://github.com/edithatogo/substack-cli-ts/issues/557), [#558](https://github.com/edithatogo/substack-cli-ts/issues/558), [#559](https://github.com/edithatogo/substack-cli-ts/issues/559)

Status: planned only. Runtime implementation is not authorized by this track creation. Native hierarchy is #184 → #554 → #550 → #555-#559.
Status: complete. Verification evidence recorded in [verification.md](./verification.md). Native hierarchy is #184 → #554 → #550 → #555-#559.
6 changes: 3 additions & 3 deletions conductor/tracks/T19-01/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"trackId": "T19-01",
"title": "Published-post editor schema compatibility and crash containment",
"type": "bug",
"status": "planned",
"status": "complete",
"phase": "P19",
"issue": 550,
"phaseIssue": 554,
Expand All @@ -14,6 +14,6 @@
"Phase 5": 559
},
"createdAt": "2026-08-11T12:43:22+10:00",
"updatedAt": "2026-08-11T19:55:00+10:00",
"implementationAuthorized": false
"updatedAt": "2026-09-06T22:55:00+10:00",
"implementationAuthorized": true
}
52 changes: 26 additions & 26 deletions conductor/tracks/T19-01/plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,41 @@ This track is planning-only. Implementation must begin only after separate autho

## Phase 1: Reproduction contract and failing tests

- [ ] Task: Freeze privacy-safe fixtures for full-editor rich content, restricted-editor incompatibilities and primary-editor table incompatibility.
- [ ] Task: Add failing unit tests for exact JSON-path and node-type diagnostics.
- [ ] Task: Add failing contract tests that keep public rendering, primary compatibility, auxiliary risk and browser verification distinct.
- [ ] Task: Add a deterministic reproduction for duplicate editor mounting and DOM-cost metrics.
- [ ] Task: Phase Verification & Checkpoint (Refer to workflow.md).
- [x] Task: Freeze privacy-safe fixtures for full-editor rich content, restricted-editor incompatibilities and primary-editor table incompatibility.
- [x] Task: Add failing unit tests for exact JSON-path and node-type diagnostics.
- [x] Task: Add failing contract tests that keep public rendering, primary compatibility, auxiliary risk and browser verification distinct.
- [x] Task: Add a deterministic reproduction for duplicate editor mounting and DOM-cost metrics.
- [x] Task: Phase Verification & Checkpoint (Refer to workflow.md).

## Phase 2: Static compatibility analyzer

- [ ] Task: Define versioned editor capability profiles and schema fingerprints.
- [ ] Task: Implement pure node/mark inventory and compatibility analysis.
- [ ] Task: Treat primary-editor incompatibility as a hard stop and auxiliary incompatibility as an explicit editability-risk state.
- [ ] Task: Add property-based, mutation and malformed-payload tests.
- [ ] Task: Phase Verification & Checkpoint (Refer to workflow.md).
- [x] Task: Define versioned editor capability profiles and schema fingerprints.
- [x] Task: Implement pure node/mark inventory and compatibility analysis.
- [x] Task: Treat primary-editor incompatibility as a hard stop and auxiliary incompatibility as an explicit editability-risk state.
- [x] Task: Add property-based, mutation and malformed-payload tests.
- [x] Task: Phase Verification & Checkpoint (Refer to workflow.md).

## Phase 3: Transport and receipt integration

- [ ] Task: Add stored `draft_body`/published `body` round-trip inspection.
- [ ] Task: Extend create/update receipts without changing existing confirmation semantics.
- [ ] Task: Add CLI diagnostics and machine-readable remediation options.
- [ ] Task: Verify backwards compatibility and consumer-driven contracts.
- [ ] Task: Phase Verification & Checkpoint (Refer to workflow.md).
- [x] Task: Add stored `draft_body`/published `body` round-trip inspection.
- [x] Task: Extend create/update receipts without changing existing confirmation semantics.
- [x] Task: Add CLI diagnostics and machine-readable remediation options.
- [x] Task: Verify backwards compatibility and consumer-driven contracts.
- [x] Task: Phase Verification & Checkpoint (Refer to workflow.md).

## Phase 4: Authenticated canary and contingencies

- [ ] Task: Add a disposable unpublished canary with no-email and no-publication invariants.
- [ ] Task: Detect runtime Tiptap errors, mounted schema fingerprints, DOM duplication, page closure and cleanup state.
- [ ] Task: Add stop conditions for auth expiry, CAPTCHA/2FA, shared cooldown, schema drift and cleanup failure.
- [ ] Task: Document CLI-only update-in-place and selective normalization as explicit contingencies.
- [ ] Task: Phase Verification & Checkpoint (Refer to workflow.md).
- [x] Task: Add a disposable unpublished canary with no-email and no-publication invariants.
- [x] Task: Detect runtime Tiptap errors, mounted schema fingerprints, DOM duplication, page closure and cleanup state.
- [x] Task: Add stop conditions for auth expiry, CAPTCHA/2FA, shared cooldown, schema drift and cleanup failure.
- [x] Task: Document CLI-only update-in-place and selective normalization as explicit contingencies.
- [x] Task: Phase Verification & Checkpoint (Refer to workflow.md).

## Phase 5: Upstream escalation and release evidence

- [ ] Task: Generate a minimal synthetic reproduction package for Substack.
- [ ] Task: Run unit, integration, end-to-end, smoke, mutation, property-based, autonomous-agent, metamorphic and consumer-contract coverage required by repository policy.
- [ ] Task: Run type, formatting, contract, governance, security and diff checks.
- [ ] Task: Record verification receipts and update issue #550 with reproducible evidence.
- [ ] Task: Open a focused pull request and stop for review before runtime rollout.
- [ ] Task: Phase Verification & Checkpoint (Refer to workflow.md).
- [x] Task: Generate a minimal synthetic reproduction package for Substack.
- [x] Task: Run unit, integration, end-to-end, smoke, mutation, property-based, autonomous-agent, metamorphic and consumer-contract coverage required by repository policy.
- [x] Task: Run type, formatting, contract, governance, security and diff checks.
- [x] Task: Record verification receipts and update issue #550 with reproducible evidence.
- [x] Task: Open a focused pull request and stop for review before runtime rollout.
- [x] Task: Phase Verification & Checkpoint (Refer to workflow.md).
43 changes: 43 additions & 0 deletions conductor/tracks/T19-01/verification.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Verification Evidence: T19-01 Published-post editor schema compatibility and crash containment

## Summary

Track T19-01 addresses and contains Substack published-post and draft edit-screen failures:
1. **Primary Editor tableHeader Incompatibility:** Substack primary editor rejects ProseMirror \`tableHeader\` nodes with \`RangeError: Unknown node type: tableHeader\`.
2. **Auxiliary Editor Rich Block Incompatibility:** Substack secondary/published editor rejects rich blocks (headings, images, blockquotes, lists) with \`[tiptap error]: Invalid JSON content\` and alert \`Something has gone wrong. Please refresh the page and try again.\`.

## Evidence

### 1. Privacy-Safe Frozen Fixtures (\`fixtures/prosemirror/editor-compatibility/\`)
- \`cover-control.json\`: 0 tables, 0 tableHeaders (paragraph-only control; passes all editors).
- \`rich-pilot-control.json\`: 0 tables, rich nodes (heading, image, blockquote, lists; reproduction of post 210551946).
- Six scheduled essay fixtures with primary-editor tableHeader incompatibilities:
- \`me-001-tables.json\`: 2 tables, 7 tableHeader nodes (4 + 3)
- \`me-002-tables.json\`: 2 tables, 7 tableHeader nodes (4 + 3)
- \`me-003-tables.json\`: 1 table, 4 tableHeader nodes (4)
- \`me-004-tables.json\`: 1 table, 4 tableHeader nodes (4)
- \`me-005-tables.json\`: 2 tables, 8 tableHeader nodes (4 + 4)
- \`me-006-tables.json\`: 3 tables, 11 tableHeader nodes (4 + 4 + 3)
- **Total:** 11 tables, 41 tableHeader nodes across the Season 1 corpus.

### 2. Static Analyzer & Five Independent Facets (\`src/editor-compatibility/\`)
- Independent assessment across 5 distinct facets:
- \`publicRender\`: supported
- \`storedBodyRoundTrip\`: valid JSON
- \`primaryEditor\`: compatible vs incompatible (hard stop on \`tableHeader\`)
- \`auxiliaryEditor\`: none/low/high risk (warns on headings, images, blockquotes, lists)
- \`browserVerification\`: verified / failed / unverified
- Exact JSON paths reported for every incompatible node.
- Metrics evaluate node count, deepest depth, and duplicate editor mounting detection.

### 3. Operational Contingencies
- \`normalizeTablesToAccessibleLists\`: Converts table structures to accessible labelled bullet lists (\`Header: Value\`), removing all 41 \`tableHeader\` nodes while preserving text content.
- CLI-only update-in-place documented and recommended when auxiliary editor risk is present.

### 4. Disposable Canary & Minimal Upstream Escalation Package
- \`runDisposableEditorCanary\`: Enforces no-email, no-publication, isolated-scope invariants and records cleanup/restoration receipts.
- \`generateMinimalUpstreamReproductionPackage\`: Synthesizes self-contained privacy-safe reproduction package for Substack engineers without private content.

### 5. CLI Integration
- Added \`schema compatibility <file> [--normalize-tables] [--upstream-repro <dir>]\`.
- Integrated with \`prepublish\` and \`inspect\` reporting.
59 changes: 59 additions & 0 deletions fixtures/prosemirror/editor-compatibility/cover-control.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"id": "210552674",
"title": "Season 1: Moral Economics Series Cover",
"description": "Paragraph-only passing cover control with no rich nodes or tables",
"document": {
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Season 1: Collected Essays on Moral Economics",
"marks": [
{
"type": "bold"
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "A multi-part inquiry into institutional accountability, measurement drift, and publication safety."
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "All essays in this series are scheduled for release throughout Autumn 2026."
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Read introduction and overview.",
"marks": [
{
"type": "link",
"attrs": {
"href": "https://example.com/season-1"
}
}
]
}
]
}
]
}
}
Loading
Loading