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
1 change: 1 addition & 0 deletions docs/prompts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ Subsequent sections are prompt-specific. Existing prompts in this directory serv
- [`encode-spec-delta-closure-loop.md`](./encode-spec-delta-closure-loop.md) — Encoded the spec-delta closure-loop discipline as a permanent CritterCab convention across three README files. Adds new `### Spec delta cadence` subsection in this README defining the four-step closure loop (prompt → session → retro → spec document-history) and a paired format-conventions bullet pairing **Spec delta** with **Goal**; new `Spec delta — landed?` bullet in [`docs/retrospectives/README.md`](../retrospectives/README.md) format conventions; clarification paragraph in [`docs/narratives/README.md`](../narratives/README.md) on what `## Document History` entries should capture under the new discipline. Pattern borrowed from OpenSpec (not adopted as a framework). Refines [ADR-003 spec-anchored development](../decisions/003-spec-anchored-development.md), which committed to keeping specs current but did not name *how* per-session deltas are tracked. ADR-016 (spec-delta-as-closure-loop-discipline) deferred per session-start lean — trigger to revisit is 2–3 sessions exercising the discipline. Surfaced and dropped a stale narrative-backfill deliverable named in the May 15 handoff doc (narratives 001 and 002 already had populated Document History sections). Status: complete (2026-05-19). Produced retro at [`retrospectives/encode-spec-delta-closure-loop.md`](../retrospectives/encode-spec-delta-closure-loop.md).
- [`housekeeping-delete-may-15-handoff.md`](./housekeeping-delete-may-15-handoff.md) — Housekeeping micro-PR following PRs #17 and #18. Deleted `docs/planning/2026-05-15-spec-delta-and-context-map-handoff.md` per the directory's "Disposable by design" lifecycle convention; both follow-up sessions the handoff doc queued (Session A and Session B) had shipped. **First prompt in CritterCab's history to include a `## Spec delta` section** — the convention's first forward exercise. Spec delta honestly named as "no canonical spec is amended" because the session is pure housekeeping; proves the convention can describe non-spec-amending sessions cleanly without forcing confabulation. Status: complete (2026-05-19). Produced retro at [`retrospectives/housekeeping-delete-may-15-handoff.md`](../retrospectives/housekeeping-delete-may-15-handoff.md).
- [`skills-tidy-ai-skills-sync.md`](./skills-tidy-ai-skills-sync.md) — **First ai-skills upstream-sync session**; lighter-cadence successor to Phase 5's full reconciliation pass. Sync target is ai-skills @ `b0d0f7d` (HEAD as of 2026-05-22). Upstream delta since Phase 5 close (~2026-05-06) is 18 commits, of which only 4 touch skill content (HTTP idiomatic + style strengthening across three upstream HTTP skills; Marten projection `IncludeType<T>()` scope clarification; first cut at migration skills for the latest Marten + Wolverine releases). The rest are infrastructure (sidebar reconciliation, Buy CTAs, install URL fixes, version bumps, the new `added_in` frontmatter convention upstream introduced). Introduces a **methodology shift**: Phase 5 used a per-skill audit lens (every Cab skill checked against its upstream counterpart); this session uses an upstream-commit-delta lens (only Cab skills whose upstream sources received content commits are inspected). Pre-prompt greps confirmed `wolverine-http-handlers/SKILL.md` does not currently contain the upstream-changed terminology (`sad path` / `happy path` / `InvokeAsync`) and `marten-projections/SKILL.md` does not currently mention `IncludeType<T>` — so **zero content propagation to Cab skill files is a valid outcome** and the retro is the primary deliverable regardless. Records sync floor SHA `b0d0f7d` and the upstream-catalog inventory (75 skills, three new since Phase 5 close) so future syncs become a `git log <last-sync>..HEAD` content-delta query. Closes out Phase 5's still-`In progress` retro as the natural conclusion of the reconciliation thread this session continues (explicitly named in metadata; not opportunistic). Second prompt in CritterCab's history to honestly name spec delta as null (first was [`housekeeping-delete-may-15-handoff.md`](./housekeeping-delete-may-15-handoff.md)). Three deferred decisions explicitly carved out: `added_in` adoption for Cab skills (separate methodology decision), `wolverine-grpc-handlers` / `wolverine-grpc-bidirectional-handlers` "ahead of ai-skills" disposition (stands until upstream `wolverine-grpc` skill publishes), and `Upstream` cross-references in Cab skills to the new upstream migration skills (no host paragraph exists). Status: complete (2026-05-23). Produced retro at [`retrospectives/skills-tidy-ai-skills-sync.md`](../retrospectives/skills-tidy-ai-skills-sync.md). Verified zero content propagation to both `wolverine-http-handlers/SKILL.md` and `marten-projections/SKILL.md` (re-greps + end-to-end reads confirmed no overlap); no Cab skill files modified. Phase 5 retro metadata close-out applied (`Status` In progress → Complete; `Outcome` synthesized from existing deliverable summary; new `## Document history` section).
- [`fix-marten9-projection-source-gen.md`](./fix-marten9-projection-source-gen.md) — **First `fix:` PR.** Out-of-band CI-unblocking fix off `main`: declared the three conventional projection subclasses (`ActiveRequestsByRiderProjection`, `RequestTimelineProjection`, `FareQuoteAttemptsProjection`) `partial` so Marten 9's compile-time `JasperFx.Events.SourceGenerator` emits their dispatchers (runtime codegen was removed in Marten 9 / JasperFx 2.0 with no fallback). Pre-existing `main` breakage from the `2f83e66` package bump, surfaced by PR #31's CI (`main` run `27477344974` was already failing). Three keywords; `dotnet test CritterCab.slnx` 7/8-failing → 8/8-green; the analyzer flows transitively through `WolverineFx.Marten` → `Marten` (no `.csproj` change). `RideRequest` self-aggregating type left untouched. Null spec-delta. Status: complete (2026-06-13). Produced retro at [`retrospectives/fix-marten9-projection-source-gen.md`](../retrospectives/fix-marten9-projection-source-gen.md).

### Workshops

Expand Down
74 changes: 74 additions & 0 deletions docs/prompts/fix-marten9-projection-source-gen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Prompt — Fix: Marten 9 Conventional Projections Must Be `partial` for Source-Gen Dispatch

| Field | Value |
|---|---|
| **Status** | Pending (sketched 2026-06-13; awaiting review before execution) |
| **Authored** | 2026-06-13 |
| **Target artifacts** | `src/CritterCab.Dispatch/RideRequesting/ActiveRideRequest.cs`, `src/CritterCab.Dispatch/RideRequesting/RequestTimeline.cs`, `src/CritterCab.Dispatch/FareQuoting/FareQuoteAttempts.cs`, `docs/retrospectives/fix-marten9-projection-source-gen.md` (new) |
| **Source-of-truth dependencies** | The CI failure on PR #31 / `main` run `27477344974`; the runtime `InvalidProjectionException` message; the JasperFx `marten-migration-v8-to-v9` ai-skill (runtime-codegen removal); the working test suite (`dotnet test CritterCab.slnx`) as the green/red oracle |
| **Workflow position** | Out-of-band CI-unblocking fix off `main`. First `fix:` PR in the repo. Lands **before** the Aspire PR (#31), which rebases onto the fixed `main` to go green. |

---

## Framing — why this session exists

The dependency bump in commit `2f83e66` moved the project to the 2026 Critter Stack line (Marten 9 / JasperFx 2.0). Marten 9 **removed runtime codegen** for conventional projections: `Apply` / `Create` / `ShouldDelete` methods are now dispatched by the compile-time `JasperFx.Events.SourceGenerator`, with **no runtime fallback**. The generator can only emit a dispatcher by augmenting a `partial` class. CritterCab's three conventional projection subclasses were not declared `partial`, so at host startup the projection graph throws `InvalidProjectionException: No source-generated dispatcher found for …`. This reds the entire test suite (7 of 8 fail at `DispatchTestFixture.InitializeAsync`).

The breakage is pre-existing on `main` (its CI for `2f83e66` is `completed failure`); PR #31 (Aspire reconcile) was merely the first PR-triggered CI run to surface it. This fix is therefore scoped narrowly to un-red `main` — not the broader Marten 9 / Wolverine 6 migration audit, which remains its own follow-up.

---

## Goal

Declare the three conventional projection subclasses `partial` so the Marten 9 source generator emits their dispatchers, restoring a green `dotnet test CritterCab.slnx`. Author a retrospective. No opportunistic edits.

---

## Spec delta

**None.** A build/runtime fix to existing implementation code; no narrative or workshop is amended. Honest null delta.

---

## Orientation files (read in order)

1. **This prompt** and the CI failure log on PR #31.
2. **`src/CritterCab.Dispatch/RideRequesting/ActiveRideRequest.cs`** — `ActiveRequestsByRiderProjection : MultiStreamProjection<ActiveRideRequest, Guid>`.
3. **`src/CritterCab.Dispatch/RideRequesting/RequestTimeline.cs`** — `RequestTimelineProjection : SingleStreamProjection<RequestTimeline, Guid>`.
4. **`src/CritterCab.Dispatch/FareQuoting/FareQuoteAttempts.cs`** — `FareQuoteAttemptsProjection : SingleStreamProjection<FareQuoteAttempts, Guid>`.
5. JasperFx `marten-migration-v8-to-v9` ai-skill — the runtime-codegen-removal section.

---

## Working pattern

- **Branch off `main`, not off the Aspire branch.** This fix must land independently so `main` goes green; the Aspire PR rebases afterward.
- **Verify against the real test suite.** `dotnet test CritterCab.slnx` (Docker up for Testcontainers Postgres) is the oracle — red before, green after. A docs-only or build-only check is insufficient because the failure is a startup-time runtime exception, not a compile error.
- **Minimal change.** `partial` keyword only. `RideRequest` (self-aggregating `LiveStreamAggregation<RideRequest>` target) does **not** need `partial` per the exception message — leave it untouched.
- **No opportunistic edits.** Other Marten 9 / Wolverine 6 breaking-change surfaces and the version doc-drift are out of scope (their own session).
- **Commit/push only on the user's say-so.**

---

## Deliverable plan

1. `ActiveRideRequest.cs` — `public class ActiveRequestsByRiderProjection` → `public partial class …`.
2. `RequestTimeline.cs` — `public class RequestTimelineProjection` → `public partial class …`.
3. `FareQuoteAttempts.cs` — `public class FareQuoteAttemptsProjection` → `public partial class …`.
4. Verify `dotnet test CritterCab.slnx` is green (8/8).
5. `docs/retrospectives/fix-marten9-projection-source-gen.md` — new retro.

---

## Out of scope

- **The rest of the Marten 9 / Wolverine 6 migration audit** (IRevisioned vs ILongVersioned, inline-lambda projection removal, ServiceLocationPolicy default flip, etc.) — its own session. This fix only addresses the one symptom redding CI.
- **Wolverine/Marten/Polecat version doc-drift** in README/CLAUDE/vision — deferred, as in the Aspire session.
- **Adding a direct `Marten` package reference or analyzer config** unless verification proves the source generator's analyzer asset does not flow transitively through `WolverineFx.Marten`.

---

## Decisions to flag during the session

1. **Does the source generator's analyzer asset flow transitively** (`WolverineFx.Marten` → `Marten`), or does CritterCab.Dispatch need a direct `Marten` reference / analyzer-asset include? If `partial` alone turns the suite green, the analyzer flows and no `.csproj` change is needed.
2. **Whether any further Marten 9 runtime failures surface** once the projection-registration error clears. If the suite reveals additional v9 breakage, capture it as a follow-up — do not expand this fix.
1 change: 1 addition & 0 deletions docs/retrospectives/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Subsequent sections are session-specific. Existing retros in this directory serv
- [`encode-spec-delta-closure-loop.md`](./encode-spec-delta-closure-loop.md) — Session A of the two follow-up sessions queued by the 2026-05-15 spec-delta + context-map handoff. Encoded the spec-delta closure-loop discipline as a CritterCab convention across three READMEs: new `### Spec delta cadence` subsection in [`docs/prompts/README.md`](../prompts/README.md) defining the four-step closure loop (prompt → session → retro → spec document history); new `Spec delta — landed?` bullet in [`docs/retrospectives/README.md`](../retrospectives/README.md) format conventions; clarification paragraph in [`docs/narratives/README.md`](../narratives/README.md) on what `## Document History` entries should capture. Pattern borrowed from OpenSpec (not adopted as a framework). Refines [ADR-003 spec-anchored development](../decisions/003-spec-anchored-development.md) — names *how* per-session deltas are tracked, which ADR-003 committed to without specifying. ADR-016 deferred per session-start lean — trigger is 2–3 sessions exercising the discipline. **First retro in CritterCab's history to exercise the `Spec delta — landed?` line** (self-referentially, since the prompt predates the convention). Surfaced and dropped a stale narrative-backfill deliverable from the handoff doc. Triggered by [`prompts/encode-spec-delta-closure-loop.md`](../prompts/encode-spec-delta-closure-loop.md). Status: complete (2026-05-19).
- [`housekeeping-delete-may-15-handoff.md`](./housekeeping-delete-may-15-handoff.md) — Housekeeping micro-PR following PRs #17 and #18. Deleted `docs/planning/2026-05-15-spec-delta-and-context-map-handoff.md` per the directory's "Disposable by design" lifecycle convention; both follow-up sessions the handoff doc queued had shipped. **First retro in CritterCab's history to forward-confirm against a prompt-named spec delta** (Session A's retro confirmed retroactively because its prompt predated the convention). The prompt named "no spec delta" honestly because the session is pure housekeeping; the named-none landed as the named-none. Validates the convention's edge-case handling for non-spec-amending sessions. Mid-session scope expanded to delink 14 broken cross-references across 7 historical-record files — new methodology precedent: do-not-edit-historical-records yields to factual correctness when a same-PR deletion creates dangling references in those records. Triggered by [`prompts/housekeeping-delete-may-15-handoff.md`](../prompts/housekeeping-delete-may-15-handoff.md). Status: complete (2026-05-19).
- [`skills-tidy-ai-skills-sync.md`](./skills-tidy-ai-skills-sync.md) — **First ai-skills upstream-sync session**; lighter-cadence successor to Phase 5's full reconciliation. Sync target was ai-skills @ `b0d0f7d` (HEAD as of 2026-05-22). Eighteen-commit upstream delta categorized as 4 content commits (HTTP strengthen ×2, projections `IncludeType<T>` clarification, migration-skills first cut) and 14 infrastructure / catalog-growth commits (sidebar reconciliation, Buy CTAs, install URL fixes, version bumps, new `added_in` frontmatter convention, three new upstream skills). Verified zero content propagation to both Cab counterparts (`wolverine-http-handlers/SKILL.md` and `marten-projections/SKILL.md`) via re-greps + end-to-end reads — upstream-changed surface lives in fundamentals layers Cab already cross-references rather than duplicates, so Phase 5's trim discipline carried the sync passively. **Closed out Phase 5 retro's metadata gap** (`Status: In progress` → `Complete`; `Outcome` synthesized from the existing `## Phase 5 deliverable summary`; new `## Document history` section) as natural continuation of the reconciliation thread. Introduces a **methodology shift** captured for future syncs: per-upstream-commit lens (this session) is correct for incremental syncs; per-skill audit (Phase 5) is correct for full reconciliations. Recorded sync floor SHA + upstream catalog inventory (75 skills, 7% growth) so the next sync becomes a `git log b0d0f7d..HEAD` content-delta query. **Second prompt-and-retro pair to exercise the spec-delta null-edge case** (first was `housekeeping-delete-may-15-handoff` on 2026-05-19). Triggered by [`prompts/skills-tidy-ai-skills-sync.md`](../prompts/skills-tidy-ai-skills-sync.md). Status: complete (2026-05-23).
- [`fix-marten9-projection-source-gen.md`](./fix-marten9-projection-source-gen.md) — **First `fix:` PR.** Declared the three conventional projection subclasses `partial` so Marten 9's source generator emits dispatchers (runtime codegen removed in v9 / JasperFx 2.0, no fallback); fixed pre-existing `main` breakage from the `2f83e66` bump that PR #31's CI surfaced. `dotnet test CritterCab.slnx` 7/8-failing → 8/8-green; analyzer flows transitively (no `.csproj` change); `RideRequest` self-aggregating type left untouched. Confirmed the diagnosis by checking `main`'s CI before assuming the PR caused it. Triggered by [`prompts/fix-marten9-projection-source-gen.md`](../prompts/fix-marten9-projection-source-gen.md). Status: complete (2026-06-13).

Phase 1–3 retrospectives were not authored at the time those phases ran (the retrospective convention solidified during Phase 4). They may be reconstructed from the working transcripts and skill artifacts if needed; otherwise they remain a known gap in the project record.

Expand Down
Loading
Loading