You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* plan
* feat: Add gas price tracking to ride records and implement gas price lookup service
- Enhanced the HistoryPage to include gas price input and display.
- Updated RecordRidePage to support gas price entry and validation.
- Implemented a new GasPriceLookupService for fetching gas prices from an external API.
- Created a GasPriceLookupEntity for caching gas prices in the database.
- Added migrations to include gas price fields in the Rides table and create a GasPriceLookups table.
- Updated tests to cover gas price functionality in both RecordRidePage and HistoryPage.
* feat: Enhance gas price tracking with EIA source integration and update tests
* feat: Add migration test coverage policy tests to ensure all migrations have corresponding test entries
* remove all unused usings
* user secret
* fix build and using issues
* Sqllite migration workaround
* feat: Enhance security in Dockerfile by configuring npm to delay new publishes and block lifecycle scripts
* feat: Implement SQLite migration compatibility workarounds
* npm ci --ignore-scripts
* fix date issues in edit ride history specs
* delete playwright report
* ignore pW report
* user-secrets into devcontainer
* aspire update
* history edit price source
* hmr on port 5173??
* hmr comment
* fix test
---------
Co-authored-by: aligneddev <aligneddev@github.com>
- Guardrails: Added non-negotiable interface/contract boundary rules for cross-module integration
12
12
Status: Approved — modular architecture and contract-first parallel delivery are now constitutional requirements
13
-
Current Update (v1.12.2): Added mandatory spec-completion gate requiring database migrations to be applied and E2E tests to pass before a spec can be marked done.
13
+
Current Update (v1.12.3): Added mandatory per-migration test coverage governance requiring each migration to include a new or updated automated test, enforced by a migration coverage policy test in CI.
14
+
Previous Update (v1.12.2): Added mandatory spec-completion gate requiring database migrations to be applied and E2E tests to pass before a spec can be marked done.
14
15
Previous Updates:
15
16
- v1.11.0: Strengthened TDD mandate with a strict gated red-green-refactor workflow requiring explicit user confirmation of failing tests before implementation.
16
17
- v1.10.2: Codified a mandatory post-change verification command matrix so every change runs explicit checks before merge.
@@ -291,6 +292,7 @@ A vertical slice is **production-ready** only when all items are verified:
291
292
-[ ] Post-change verification matrix executed for the impacted scope and evidence recorded
- DataAnnotations constraints validated at database layer
@@ -394,6 +397,7 @@ Tests suggested by agent must receive explicit user approval before implementati
394
397
14.**User Acceptance**: User validates slice meets specification and data validation rules observed
395
398
15.**Phase Completion Commit**: Before starting the next phase, create a dedicated phase-completion commit that includes completed tasks and verification evidence for that phase
396
399
16.**Spec Completion Gate**: Before marking any specification as done, database migrations for that spec must be applied successfully to the target local runtime database and the spec's end-to-end (Playwright) tests must run green
400
+
17.**Migration Test Coverage Gate**: Every migration added or modified in a branch must include a new or updated automated test and must be represented in the migration coverage policy test map before merge
397
401
398
402
### Compliance Audit Checklist
399
403
@@ -410,6 +414,7 @@ Tests suggested by agent must receive explicit user approval before implementati
410
414
-[ ] TDD gate commits created: red baseline commit, green commit, and separate refactor commit when applicable
411
415
-[ ] Phase completion commit created before moving to the next phase
412
416
-[ ] Database migrations for the spec are created and applied successfully to the runtime database used for validation
417
+
-[ ] Every migration introduced or modified by the spec has a corresponding new or updated automated test and a migration-coverage policy entry
413
418
-[ ] Spec-level E2E (Playwright) suite executed and passing before spec marked complete
414
419
-[ ] All SAMPLE_/DEMO_ data removed from code before merge
@@ -445,6 +450,7 @@ Breaking these guarantees causes architectural decay and technical debt accrual:
445
450
-**TDD cycle is strictly gated and non-negotiable** — implementation code must never be written before failing tests exist, have been run, and the user has reviewed and confirmed the failures. The sequence is always: plan tests → write tests → run and prove failure → get user confirmation → implement → run after each change → verify all pass → consider refactoring. Skipping or reordering any step is prohibited.
446
451
-**Commit gates are mandatory for TDD and phase transitions** — every TDD gate transition requires a commit (red, green, and refactor when performed), and every completed phase requires a dedicated phase-completion commit before proceeding.
447
452
-**Spec completion requires migration + E2E gates** — a spec cannot be marked done until its database migrations are applied to the runtime database and its Playwright E2E scenarios pass.
453
+
-**Every migration requires a test update** — each migration must ship with a new or updated automated test and an updated migration coverage policy entry; changes are blocked when migration coverage is incomplete.
448
454
-**Expected-flow C# logic uses Result, not exceptions** — validation, not-found, conflict, and authorization business outcomes must be returned via typed Result objects (including error code/message metadata). Throwing exceptions for these expected outcomes is prohibited; exceptions are only for truly unexpected failures.
449
455
-**Cross-module work is contract-first and interface-bound** — teams must integrate through explicit interfaces and versioned contracts only; direct coupling to another module's internal implementation is prohibited.
450
456
-**No Entity Framework DbContext in domain layer** — domain must remain infrastructure-agnostic. If domain needs persistence logic, use repository pattern abstracting EF.
# Specification Quality Checklist: Gas Price Lookup at Ride Entry
2
+
3
+
**Purpose**: Validate specification completeness and quality before proceeding to planning
4
+
**Created**: 2026-03-31
5
+
**Feature**: [spec.md](../spec.md)
6
+
7
+
## Content Quality
8
+
9
+
-[x] No implementation details (languages, frameworks, APIs)
10
+
-[x] Focused on user value and business needs
11
+
-[x] Written for non-technical stakeholders
12
+
-[x] All mandatory sections completed
13
+
14
+
## Requirement Completeness
15
+
16
+
-[x] No [NEEDS CLARIFICATION] markers remain — FR-012 resolved: EIA API with team-managed key; secret storage deferred to a separate concern
17
+
-[x] Requirements are testable and unambiguous
18
+
-[x] Success criteria are measurable
19
+
-[x] Success criteria are technology-agnostic (no implementation details)
20
+
-[x] All acceptance scenarios are defined
21
+
-[x] Edge cases are identified
22
+
-[x] Scope is clearly bounded
23
+
-[x] Dependencies and assumptions identified
24
+
25
+
## Feature Readiness
26
+
27
+
-[x] All functional requirements have clear acceptance criteria
28
+
-[x] User scenarios cover primary flows
29
+
-[x] Feature meets measurable outcomes defined in Success Criteria
30
+
-[x] No implementation details leak into specification
31
+
32
+
## Notes
33
+
34
+
- FR-010 resolved: EIA API (U.S. government source) with a free team-managed API key. Secret storage mechanism (e.g., KeyVault, environment variable) is deferred and out of scope for this feature.
35
+
- All items pass. The spec is ready for `/speckit.plan`.
|`date`| string (YYYY-MM-DD) | Yes | Valid ISO date format | The ride date to look up the gas price for. |
25
+
26
+
### Response: 200 OK
27
+
28
+
```json
29
+
{
30
+
"date": "2026-03-31",
31
+
"pricePerGallon": 3.1860,
32
+
"isAvailable": true,
33
+
"dataSource": "EIA_EPM0_NUS_Weekly"
34
+
}
35
+
```
36
+
37
+
**When unavailable** (API down, no data, future date with no coverage):
38
+
```json
39
+
{
40
+
"date": "2100-01-01",
41
+
"pricePerGallon": null,
42
+
"isAvailable": false,
43
+
"dataSource": null
44
+
}
45
+
```
46
+
47
+
### Response: 400 Bad Request
48
+
49
+
Returned when `date` is missing or not a valid date string.
50
+
51
+
```json
52
+
{
53
+
"error": "invalid_request",
54
+
"message": "date query parameter is required and must be a valid date in YYYY-MM-DD format."
55
+
}
56
+
```
57
+
58
+
### Response: 401 Unauthorized
59
+
60
+
Returned when no valid bearer token is present.
61
+
62
+
### Notes
63
+
64
+
- This endpoint never returns a 5xx for EIA lookup failures. EIA failures are absorbed and reflected as `isAvailable: false` with `pricePerGallon: null`.
65
+
- The response is deterministic for any given date: once a price is cached, the same value is always returned for that date.
66
+
- The `date` parameter is used as the cache key. The actual EIA period date (the Monday of the survey week) may differ; it is not exposed in this contract.
67
+
68
+
---
69
+
70
+
## Modified Contract: GET /api/rides/defaults
71
+
72
+
Extends the existing defaults endpoint to include the most recent ride's gas price.
73
+
74
+
### Response: 200 OK (extended)
75
+
76
+
Adds `defaultGasPricePerGallon` to the existing response:
0 commit comments