Feature #3511
open[drcarrot-mobile-vaccine-v3] orchestration run
0%
Description
Orchestration run tracking ticket. Not the real implementation ticket — this exists only so the live timing table has somewhere to post from step 1 onward. The real backend/mobile/web ticket(s) are created and cross-linked here once the run reaches that step.
Requirement:
"Write comprehensive Jest unit tests for the Vaccines module to achieve full code coverage.
Target Coverage¶
- Statements: 90%+
- Branches: 85%+
- Functions: 90%+
- Lines: 90%+
These targets must match the repo's global coverage thresholds in jest.config.js.
Scope¶
Cover every layer that exists for the Vaccines module:
- Service:
src/services/VaccinesService.tsor equivalent - Hooks:
src/hooks/Vaccines/** - Screens:
src/screens/Vaccines/** - Sections/components:
src/sections/Vaccines/**orsrc/components/Vaccines/** - Utils:
src/utils/Vaccines/** - Redux slice, if present:
src/store/slices/VaccinesSlice.ts - Storybook stories, if present:
src/sections/Vaccines/**/*.stories.tsxsrc/components/Vaccines/**/*.stories.tsx
- Tracing, if present:
src/traces/Vaccines.ts
Storybook Tests¶
If Vaccines contains .stories.tsx files:
- Create tests under:
src/__tests__/sections/Vaccines/<Component>.stories.test.tsx - Import every named story export.
- Render every exported story using the same RTL helpers already used elsewhere in the project.
- Verify every story renders without crashing.
- Verify story args/controls match the component prop types.
- Tag Storybook tests with
@p2, unless the story is the only meaningful coverage for a component, in which case use@p1.
Trace Tests¶
If src/traces/Vaccines.ts exists, create:
src/__tests__/traces/Vaccines.test.ts
Mock src/utils/otel.ts exactly as existing trace tests do.
For every exported span-builder/helper, verify:
- Span name
- Span attributes
- Successful execution
status=ERRORon failure- Error recording on failure
Use:
@p1for successful execution tests@p2for failure-path tests
Test Priority Tags¶
Every it() / test() title must start with @p1, @p2, or @p3.
@p1 — Critical Path¶
Cover:
- Component/hook renders or initializes without crashing
- Empty/loading/no-records states
- Core Vaccines happy paths
- Primary API success and failure handling
- Required-field validation
- Status/data mapping
- Auth/permission gates that block access
@p2 — Important Secondary Behavior¶
Cover:
- Search/sort/filter interactions
- API parameter wiring
- Pagination
- Dialog open/close/cancel
- Permission-based UI hiding
- Refresh/pull-to-refresh
- Secondary API errors
- File upload validation, if applicable
- Report generation/download/sequence behavior, if applicable
@p3 — Edge Cases¶
Cover:
null/undefined/ boolean coercion- Malformed or partial API responses
- Invalid/boundary dates
- Non-matching selections
- Whitespace-only/empty search
- Independent toggle states
Test Implementation Requirements¶
-
Inspect all Vaccines source files line by line before writing tests.
-
Exercise every:
- Conditional
- Ternary
- Optional-chaining fallback
- Switch/case branch
- Validation branch
- Success path
- Error path
- Use the existing mock boilerplate patterns in this repo.
Use these reference tests:
src/__tests__/services/ProcurementsService.test.tssrc/__tests__/hooks/procurement/usePurchaseBill.test.ts
- Mock the following exactly as the reference tests do:
ApiClientAsyncStorageLogger- Navigation
Do not introduce a new mocking approach.
- Organize tests using
describe()blocks by behavior area:
- Core behavior
- Search & sort
- Pagination
- Permissions
- Error handling
- Edge cases
-
Do not use
anyor other explicit unsafe types in test code. -
Do not add:
- Skipped tests
- Pending tests
- Unnecessary snapshot tests
-
Do not modify production/business logic.
-
Only add or update the required Jest test files and test configuration if absolutely necessary for priority filtering.
-
Do not create unnecessary documentation.
Coverage Validation¶
After implementing the tests, run:
BA Updated by Bot AI about 1 month ago
Account status — using account 2
- Window usage so far: 37,863,957 tokens ($41.89) — 198% of its own last observed ceiling
- Total dispatches on this account: 134
BA Updated by Bot AI about 1 month ago · Edited
Phase Timeline¶
| # | Process | Start (IST) | End (IST) | Duration | Input | Output | Cache Create | Cache Read | Tokens | Cost | Model |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Requirement scope detection | 22-09-2026 20:30:10 | 22-09-2026 20:30:18 | 7s | 2 | 138 | 30,849 | 0 | 30,989 | $0.1907 | claude-sonnet-5 |
| 2 | Initialise run ticket (timing anchor) | 22-09-2026 20:30:18 | 22-09-2026 20:30:19 | 1s | not available | not available | not available | not available | not available | not available | Script |
| 3 | Probe environment | 22-09-2026 20:30:20 | 22-09-2026 20:30:28 | 8s | not available | not available | not available | not available | not available | not available | API Script |
| 4 | Extract ticket-spec, acceptance criteria & test scenarios | 22-09-2026 20:30:28 | 22-09-2026 20:32:43 | 2m | 2,563 | 19,284 | 38,432 | 0 | 60,279 | $0.5305 | claude-sonnet-5 |
| 5 | Prepare execution plan | 22-09-2026 20:32:43 | 22-09-2026 20:32:43 | 0s | not available | not available | not available | not available | not available | not available | Script |
| 6 | Initialise timing note | 22-09-2026 20:32:44 | 22-09-2026 20:32:44 | 0s | not available | not available | not available | not available | not available | not available | API Script |
| 7 | Execution plan — human gate | 22-09-2026 20:32:45 | 22-09-2026 20:33:23 | 37s | n/a | n/a | n/a | n/a | n/a | n/a | n/a |
| 8 | Mobile & Web task redmine ticket creations — mobile | 22-09-2026 20:33:29 | 22-09-2026 20:33:31 | 1s | not available | not available | not available | not available | not available | not available | API Script |
| 9 | Cross-link tickets | 22-09-2026 20:33:32 | 22-09-2026 20:33:33 | 0s | not available | not available | not available | not available | not available | not available | API Script |
| 10 | Write contract file | 22-09-2026 20:33:33 | 22-09-2026 20:33:33 | 0s | 0 | 0 | 0 | 0 | 0 (SKIPPED — capability absent — sides.backend.live_verified.verdict = , want one of ['PASSED', 'SKIPPED']) | 0 (SKIPPED) | -- |
| 11 | Validate contract vs screens | 22-09-2026 20:33:34 | 22-09-2026 20:33:34 | 0s | 0 | 0 | 0 | 0 | 0 (SKIPPED — capability absent — contract.path exists=False, want True) | 0 (SKIPPED) | -- |
| 12 | Propagate contract to consumer repos | 22-09-2026 20:33:34 | 22-09-2026 20:33:34 | 0s | 0 | 0 | 0 | 0 | 0 (SKIPPED — capability absent — contract.path exists=False, want True) | 0 (SKIPPED) | -- |
| 13 | Determine backend connection | 22-09-2026 20:33:34 | 22-09-2026 20:33:34 | 0s | 0 | 0 | 0 | 0 | 0 (SKIPPED — capability absent — contract.path exists=False, want True) | 0 (SKIPPED) | -- |
| 14 | Mobile: Create feature branch | 22-09-2026 20:33:35 | 22-09-2026 20:33:53 | 17s | not available | not available | not available | not available | not available | not available | API Script |
| 15 | Mobile: Repo context | 22-09-2026 20:33:53 | 22-09-2026 20:33:54 | 1s | not available | not available | not available | not available | not available | not available | Script |
| 16 | Mobile: Resolve test target files | 22-09-2026 20:33:55 | 22-09-2026 20:33:56 | 1s | not available | not available | not available | not available | not available | not available | Script |
| 17 | Shared Context Bundle | 22-09-2026 20:33:57 | 22-09-2026 20:33:57 | 0s | not available | not available | not available | not available | not available | not available | Script |
| 18 | GAP — unattributed | 22-09-2026 20:33:57 | 22-09-2026 20:54:27 | 21m | n/a | n/a | n/a | n/a | n/a — wait time, not compute | n/a — wait time, not compute | n/a |
| 19 | 1. Unit Tests (re-dispatched ×2; first attempt 22-09-2026 20:33:58) | 22-09-2026 20:54:27 | 22-09-2026 21:00:41 | 6m | 26 | 13,273 | 47,413 | 1,114,267 | 1,174,979 | $0.8211 | claude-sonnet-5 |
| 20 | Git & MR (retried ×2 — transient_api_error; transient_api_error) (re-dispatched ×3; first attempt 22-09-2026 21:00:42) | 22-09-2026 21:01:26 | 22-09-2026 21:01:34 | 7s | not available | not available | not available | not available | not available | not available | API Script |
| 21 | Validate verification evidence | 22-09-2026 21:01:35 | 22-09-2026 21:01:36 | 1s | not available | not available | not available | not available | not available | not available | API Script |
| 22 | Completion Summary | 22-09-2026 21:01:37 | 22-09-2026 21:01:37 | 0s | not available | not available | not available | not available | not available | not available | API Script |
| 23 | Write handoff doc | 22-09-2026 21:01:38 | 22-09-2026 21:01:38 | 0s | not available | not available | not available | not available | not available | not available | Script |
| 24 | Resolve tickets + post usage summary | 22-09-2026 21:01:39 | 22-09-2026 21:01:42 | 3s | not available | not available | not available | not available | not available | not available | Script |
| 25 | Mobile: Join parallel gates | -- | 22-09-2026 21:00:41 | -- | n/a | n/a | n/a | n/a | n/a | n/a | n/a |
| 26 | Join — all active sides implemented | -- | 22-09-2026 21:01:34 | -- | n/a | n/a | n/a | n/a | n/a | n/a | n/a |
| — | ORCHESTRATOR TOTAL (rows 7–26) | — | — | 37s | 0 | 0 | 0 | 0 | 0 | $0.0000 | — |
| — | SHARED TOTAL (rows 1–24) | — | — | 9m | 2,591 | 32,695 | 116,694 | 1,114,267 | 1,266,247 | $1.5424 | — |
| — | GRAND TOTAL (wall clock) | 22-09-2026 20:30:10 | 22-09-2026 21:01:42 | 32m | 2,591 | 32,695 | 116,694 | 1,114,267 | 1,266,247 | $1.5424 | — |
ORCHESTRATOR TOTAL: 37s, 0 tokens, $0.0000 (rows 7–26)
SHARED TOTAL: 9m, 1,266,247 tokens, $1.5424, 15 row(s) with no token data (rows 1–24)
Total Run Time: 32m (wall clock, 22-09-2026 20:30:10 → 22-09-2026 21:01:42 IST — not a sum of the per-side totals above, since sides overlap)
Active time: 11m | Waiting (session limits, approvals, dead sessions): 21m — 1 gap(s) still unattributed; label them with driver.py gap <slug> --from <ISO> --to <ISO> --reason '<why>'
Total Tokens Consumed: 1,266,247 (plus 15 row(s) whose usage was never captured — run execution_tracker.py enrich-audit to backfill. This is a floor, not the total.)
Token breakdown: input 2,591 · output 32,695 · cache-create 116,694 · cache-read 1,114,267 (88% of the total). Cache-read is context a node re-sends to itself across its own tool-use turns, billed at roughly a tenth of fresh input — a large Tokens number that is mostly cache-read is a long tool loop, not a large workload.
Total Cost: $1.5424 (plus 15 row(s) whose usage was never captured — run execution_tracker.py enrich-audit to backfill. This is a floor, not the total.)
BA Updated by Bot AI about 1 month ago
Account status — using account 3
- Window usage so far: 10,908,959 tokens ($7.57) — 428% of its own last observed ceiling
- Total dispatches on this account: 20
BA Updated by Bot AI about 1 month ago
Account status — account 3 hit its limit, switching away
- Reason: usage_limit
- Real usage at cutoff: 0 tokens ($0.00) — this becomes its new observed ceiling
- Cooling down until: 2026-09-22T15:16:30.167941+00:00
- Consecutive failures: 1
BA Updated by Bot AI about 1 month ago
Account status — using account 3
- Window usage so far: 0 tokens ($0.00) — 0% of its own last observed ceiling
- Total dispatches on this account: 21