51 lines
1.9 KiB
Markdown
51 lines
1.9 KiB
Markdown
---
|
|
id: TASK-36
|
|
title: Remove optional helper undefined args
|
|
status: Done
|
|
assignee: []
|
|
created_date: '2026-06-06 21:15'
|
|
updated_date: '2026-06-10 19:27'
|
|
labels: []
|
|
dependencies: []
|
|
priority: high
|
|
ordinal: 38000
|
|
---
|
|
|
|
## Description
|
|
|
|
<!-- SECTION:DESCRIPTION:BEGIN -->
|
|
Fix remaining spec-review issues in auditGenerationAction by avoiding explicit undefined auditId and nested usage fields in helper call arguments.
|
|
<!-- SECTION:DESCRIPTION:END -->
|
|
|
|
## Acceptance Criteria
|
|
<!-- AC:BEGIN -->
|
|
- [x] #1 persistAuditStage callsites include auditId only by conditional spread
|
|
- [x] #2 recordOpenRouterUsage/recordAuditUsageEvent/capture helper callsites include optional auditId only by conditional spread
|
|
- [x] #3 stage usage helper args are built without explicit undefined token fields
|
|
<!-- AC:END -->
|
|
|
|
## Implementation Plan
|
|
|
|
<!-- SECTION:PLAN:BEGIN -->
|
|
1. Inspect auditId and usage helper callsites
|
|
2. Add RED source contracts for optional auditId and nested usage args
|
|
3. Run focused test and record RED
|
|
4. Implement minimal conditional spreads and usage arg helper
|
|
5. Run focused tests green and full pnpm test if fast
|
|
6. Self-review scope and leave task In Progress
|
|
<!-- SECTION:PLAN:END -->
|
|
|
|
## Implementation Notes
|
|
|
|
<!-- SECTION:NOTES:BEGIN -->
|
|
RED: tsc passed. Focused node --test .test-output/tests/audit-generation-action-source.test.js failed as expected on persistAuditStage auditId callsites, helper auditId callsites, and inline nested usage objects.
|
|
|
|
GREEN: pnpm exec tsc -p tsconfig.test.json passed. Focused node --test .test-output/tests/audit-generation-action-source.test.js passed 24/24. Full pnpm test passed 356/356. Implemented conditional auditId spreads at persist/helper callsites and stage usage builder for callsite usage objects.
|
|
<!-- SECTION:NOTES:END -->
|
|
|
|
## Final Summary
|
|
|
|
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
|
|
Closed per explicit user request while switching project tracking to pitchfast.
|
|
<!-- SECTION:FINAL_SUMMARY:END -->
|