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
71 changes: 71 additions & 0 deletions conductor/contracts/substack-cli-maturity.contract.json
Original file line number Diff line number Diff line change
Expand Up @@ -2600,6 +2600,26 @@
"url": "https://github.com/edithatogo/substack-cli-ts/issues/537",
"title": "Prevent title and subtitle duplication in published post bodies"
}
},
{
"id": "T18-02",
"phaseId": "P18",
"title": "Metadata duplication transport regression matrix",
"status": "planned",
"contractIds": [
"PARSER-AST-006",
"FEATURE-FIDELITY-008",
"UX-CLI-CONTRACT-005"
],
"requiredTaskCount": 3,
"existingIssues": [
544
],
"issue": {
"number": 544,
"url": "https://github.com/edithatogo/substack-cli-ts/issues/544",
"title": "T18-02 Metadata duplication transport regression matrix"
}
}
],
"tasks": [
Expand Down Expand Up @@ -7193,6 +7213,57 @@
"UX-CLI-CONTRACT-005"
],
"release": "next patch"
},
{
"id": "T18-02-TASK-01",
"title": "Add table-driven preparation regression matrix",
"trackId": "T18-02",
"phaseId": "P18",
"status": "planned",
"contractIds": [
"PARSER-AST-006",
"FEATURE-FIDELITY-008",
"UX-CLI-CONTRACT-005"
],
"issue": {
"number": 545,
"url": "https://github.com/edithatogo/substack-cli-ts/issues/545",
"title": "T18-02 Add table-driven preparation regression matrix"
}
},
{
"id": "T18-02-TASK-02",
"title": "Assert transport payload preserves metadata/body separation",
"trackId": "T18-02",
"phaseId": "P18",
"status": "planned",
"contractIds": [
"PARSER-AST-006",
"FEATURE-FIDELITY-008",
"UX-CLI-CONTRACT-005"
],
"issue": {
"number": 546,
"url": "https://github.com/edithatogo/substack-cli-ts/issues/546",
"title": "T18-02 Assert transport payload preserves metadata/body separation"
}
},
{
"id": "T18-02-TASK-03",
"title": "Run and record deterministic regression verification",
"trackId": "T18-02",
"phaseId": "P18",
"status": "planned",
"contractIds": [
"PARSER-AST-006",
"FEATURE-FIDELITY-008",
"UX-CLI-CONTRACT-005"
],
"issue": {
"number": 547,
"url": "https://github.com/edithatogo/substack-cli-ts/issues/547",
"title": "T18-02 Run and record deterministic regression verification"
}
}
],
"issueMap": {
Expand Down
32 changes: 30 additions & 2 deletions conductor/programme-state.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@
{
"id": "P18",
"issue": 538,
"state": "CLOSED",
"status": "Done"
"state": "OPEN",
"status": "In Progress"
}
],
"tracks": [
Expand Down Expand Up @@ -468,6 +468,13 @@
"state": "CLOSED",
"status": "Done",
"evidence": "conductor/archive/T18-01/verification.md"
},
{
"id": "T18-02",
"phase": "P18",
"issue": 544,
"state": "OPEN",
"status": "Todo"
}
],
"tasks": [
Expand Down Expand Up @@ -2022,6 +2029,27 @@
"state": "CLOSED",
"status": "Done",
"evidence": "conductor/archive/T18-01/verification.md"
},
{
"id": "T18-02-TASK-01",
"track": "T18-02",
"issue": 545,
"state": "OPEN",
"status": "Todo"
},
{
"id": "T18-02-TASK-02",
"track": "T18-02",
"issue": 546,
"state": "OPEN",
"status": "Todo"
},
{
"id": "T18-02-TASK-03",
"track": "T18-02",
"issue": 547,
"state": "OPEN",
"status": "Todo"
}
],
"supplemental": [
Expand Down
76 changes: 74 additions & 2 deletions conductor/traceability.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,10 @@
"title": "Metadata/body de-duplication correctness",
"releaseTarget": "next patch",
"tracks": [
"T18-01"
"T18-01",
"T18-02"
],
"status": "contract_verified"
"status": "in_progress"
}
},
"tracks": {
Expand Down Expand Up @@ -862,6 +863,26 @@
537
],
"issue": null
},
"T18-02": {
"id": "T18-02",
"phaseId": "P18",
"title": "Metadata duplication transport regression matrix",
"status": "planned",
"contractIds": [
"PARSER-AST-006",
"FEATURE-FIDELITY-008",
"UX-CLI-CONTRACT-005"
],
"requiredTaskCount": 3,
"existingIssues": [
544
],
"issue": {
"number": 544,
"url": "https://github.com/edithatogo/substack-cli-ts/issues/544",
"title": "T18-02 Metadata duplication transport regression matrix"
}
}
},
"tasks": {
Expand Down Expand Up @@ -4679,6 +4700,57 @@
"UX-CLI-CONTRACT-005"
],
"release": "next patch"
},
"T18-02-TASK-01": {
"id": "T18-02-TASK-01",
"title": "Add table-driven preparation regression matrix",
"trackId": "T18-02",
"phaseId": "P18",
"status": "planned",
"contractIds": [
"PARSER-AST-006",
"FEATURE-FIDELITY-008",
"UX-CLI-CONTRACT-005"
],
"issue": {
"number": 545,
"url": "https://github.com/edithatogo/substack-cli-ts/issues/545",
"title": "T18-02 Add table-driven preparation regression matrix"
}
},
"T18-02-TASK-02": {
"id": "T18-02-TASK-02",
"title": "Assert transport payload preserves metadata/body separation",
"trackId": "T18-02",
"phaseId": "P18",
"status": "planned",
"contractIds": [
"PARSER-AST-006",
"FEATURE-FIDELITY-008",
"UX-CLI-CONTRACT-005"
],
"issue": {
"number": 546,
"url": "https://github.com/edithatogo/substack-cli-ts/issues/546",
"title": "T18-02 Assert transport payload preserves metadata/body separation"
}
},
"T18-02-TASK-03": {
"id": "T18-02-TASK-03",
"title": "Run and record deterministic regression verification",
"trackId": "T18-02",
"phaseId": "P18",
"status": "planned",
"contractIds": [
"PARSER-AST-006",
"FEATURE-FIDELITY-008",
"UX-CLI-CONTRACT-005"
],
"issue": {
"number": 547,
"url": "https://github.com/edithatogo/substack-cli-ts/issues/547",
"title": "T18-02 Run and record deterministic regression verification"
}
}
},
"contractMap": {},
Expand Down
1 change: 1 addition & 0 deletions conductor/tracks.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,4 @@ Canonical status is evidence-gated by [programme-state.json](./programme-state.j

## P18 Metadata/body de-duplication correctness
- [x] **T18-01 Metadata/body de-duplication correctness** ([#537](https://github.com/edithatogo/substack-cli-ts/issues/537)) ([evidence](./archive/T18-01/index.md))
- [ ] **T18-02 Metadata duplication transport regression matrix** ([#544](https://github.com/edithatogo/substack-cli-ts/issues/544))
8 changes: 8 additions & 0 deletions conductor/tracks/T18-02/contracts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"schemaVersion": 1,
"trackId": "T18-02",
"contractIds": ["PARSER-AST-006", "FEATURE-FIDELITY-008", "UX-CLI-CONTRACT-005"],
"programmeIssue": 184,
"project": 38
}

15 changes: 15 additions & 0 deletions conductor/tracks/T18-02/design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Design T18-02

```mermaid
flowchart LR
A["Markdown case matrix"] --> B["Shared preparePost boundary"]
B --> C["Markdown / HTML / ProseMirror assertions"]
C --> D["buildSubstackDraftPayload"]
D --> E["Serialized draft-write body assertion"]
E --> F{"Metadata absent from body?"}
F -->|Yes| G["Regression passes"]
F -->|No| H["Regression fails"]
```

The tests intentionally inspect each representation rather than only checking a final rendered string. This prevents a later transport adapter from reintroducing a defect already fixed at preparation time.

10 changes: 10 additions & 0 deletions conductor/tracks/T18-02/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# T18-02 Metadata duplication transport regression matrix

- [Specification](./spec.md)
- [Requirements](./requirements.md)
- [Design](./design.md)
- [Plan](./plan.md)
- [Verification](./verification.md)
- [Metadata](./metadata.json)
- [GitHub issue #544](https://github.com/edithatogo/substack-cli-ts/issues/544)

12 changes: 12 additions & 0 deletions conductor/tracks/T18-02/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"trackId": "T18-02",
"title": "Metadata duplication transport regression matrix",
"type": "quality",
"status": "in_progress",
"parentIssue": 538,
"issue": 544,
"taskIssues": [545, 546, 547],
"project": 38,
"createdAt": "2026-08-11T00:10:00+10:00"
}

8 changes: 8 additions & 0 deletions conductor/tracks/T18-02/plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Plan T18-02

1. Add the preparation matrix for metadata/body representations and preservation cases.
2. Add a payload serialization regression proving transport does not reintroduce duplication.
3. Run focused, type, full, contract, governance, formatting, and diff checks.
4. Open a focused pull request, monitor checks and comments, and merge only after required checks pass.
5. Record evidence, close the track, and remove its disposable worktree and branch.

24 changes: 24 additions & 0 deletions conductor/tracks/T18-02/requirements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Requirements T18-02

## Must

- Add table-driven regression cases for plain, formatted, and heading metadata representations.
- Assert synchronized Markdown, HTML, and ProseMirror output after preparation.
- Assert the serialized publish payload does not reintroduce removed metadata.
- Preserve mismatch and later-body-match behavior.
- Keep the tests deterministic and independent of live credentials.

## Should

- Exercise title fallback when front matter does not provide a title.
- Keep the matrix easy to extend for future parser representations.

## Could

- Add fixture-backed cases for additional Markdown constructs.

## Won't

- Add fuzzy or semantic deletion of body content.
- Add live Substack calls to the regression suite.

6 changes: 6 additions & 0 deletions conductor/tracks/T18-02/risks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Risks T18-02

- Parser output changes could make a representation-specific case fail; the matrix should expose that drift before publication.
- A future transport adapter could serialize a different body shape; the payload assertion covers the current draft-write boundary.
- Live Substack behavior remains outside deterministic CI and requires the existing canary controls.

6 changes: 6 additions & 0 deletions conductor/tracks/T18-02/spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Specification T18-02

The publishing pipeline must preserve a single canonical copy of title and subtitle metadata. Regression coverage must prove that normalization is retained through preparation, ProseMirror payload construction, and serialized draft-write request construction.

The matrix covers plain, formatted, and heading representations; title fallback; mismatches; and later body matches. Exact leading metadata is removable, while non-leading or non-matching content remains publishable body content.

4 changes: 4 additions & 0 deletions conductor/tracks/T18-02/verification.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Verification T18-02

Pending implementation and hosted CI evidence.

Loading
Loading