Reconciles repository state after the local toolchain moved to Flutter 3.47.0
/ Dart 3.13.0. No product code changed - no lib/ or test/ file was modified.
Working tree drift:
1. analysis_options.yaml churn (accepted, 11 files). Flutter 3.47 ships
AnalysisOptionsMigration, which unconditionally writes a fixed
analyzer.exclude block into every analysis_options.yaml. It runs from
ensureReadyForPlatformSpecificTooling, so pub get / analyze / run / build
all restore it, and there is no opt-out (flutter#191160, flutter#191131).
Commit 92d83e0 previously reverted this; the revert did not hold - a full
test sweep regenerated the block in 8 more packages. Accepted and committed
rather than fighting the tool. Verified the risky web/** entry drops
nothing: neither kell_web/web/ nor kell_mobile/web/ contains .dart files.
2. kell_mobile web scaffold (reverted). A stray `flutter create
--platforms=web` had added an untracked web/ directory and rewritten
.metadata so the android platform entry was replaced by web. kell_mobile is
the Android target, so .metadata was restored and the scaffold deleted.
3. kell_mobile/pubspec.lock (accepted). Transitive bumps resolved under the
newer SDK: clock, matcher, meta, stack_trace, test_api, vector_math,
vm_service. All SDK-pinned.
Master document reconciliation:
- PROJECT_STATE_AUDIT.md: removed a duplicated "## 5. Summary Scorecard"
section - the scorecard and readiness table were present twice from a bad
append. Re-baselined the remaining §5 against main, added a test-count
column, and corrected §3.4 counts and §3.5 antipattern status. Stages
10C-10F, 11A, and 16A had landed but were still recorded as missing.
- master_development_brief.md: Appendix A maturity matrix refreshed to the
verified counts; new "Toolchain baseline" section documents the Flutter 3.47
behaviour so a future slice does not try to revert it again.
- build_execution_tracker.md: added the reconciliation slice entry and a
toolchain note.
- Fixed a pre-existing MD040 lint error (unlabelled code fence).
Verification:
- dart analyze --fatal-infos: clean across all 11 packages and apps
- tests: 1,898 / 1,898 passing (core 90, design_system 51, auth 42,
integrations 123, data 63, feature_wordpress 545, feature_inventory 167,
feature_orders 657, feature_policy 17, kell_web 62, kell_mobile 81) -
identical to the Stage 11A total, confirming no behaviour change
- markdownlint-cli2: 0 issues
Adds the custom/made-to-order commission workflow to feature_orders at the
domain and data layers. No UI in this slice — Stage 11B/11C cover the
CustomOrderFormPage, confirmation, and tracking surfaces.
Custom orders extend the existing Order aggregate rather than forming a
parallel system, so they flow through the same repository contract and the
same order management pipeline as standard orders.
Domain:
- OrderType enum (standard, custom) with wireValue/fromWire; fromWire defaults
to standard so an order written by an older client is never mis-classified
as a commission.
- CustomOrderSpec value object — material, color, size, dimensions,
unmodifiable reference image URLs, free-text notes, estimated completion.
Immutable with copyWith, list-aware ==/hashCode, and a toString that reports
the reference image count rather than the URLs.
- DepositInfo value object — all money as integer cents, consistent with
PaymentResult.amountCents, so repeated deposit/balance/settlement arithmetic
cannot drift. Derived balanceDueCents clamps at zero rather than reporting a
credit when a deposit exceeds the total.
- FulfillmentStatus pipeline: quoted -> depositReceived -> inProduction ->
qualityCheck -> readyForPickup -> completed, plus cancelled from any
non-terminal stage. FulfillmentTransition enforces legality in the domain —
illegal jumps, same-stage advances, and any move out of a terminal stage are
rejected with an explanatory reason rather than silently applied.
qualityCheck -> inProduction is permitted: failed inspection sending a piece
back to the bench is a real workshop operation.
- Order extended with orderType (defaults to standard), nullable
customOrderSpec, depositInfo, and fulfillmentStatus, plus isCustom,
hasDeposit, and balanceDueCents. Every existing field, default, and copyWith
semantic is preserved.
- OrdersRepository extended with createCustomOrder, updateCustomOrderSpec,
recordDeposit, and advanceFulfillmentStatus.
Data:
- FakeOrdersRepository implements all four methods and seeds five custom
orders (KC-C2001..KC-C2005) covering every non-terminal pipeline stage. The
six standard orders are unchanged.
- WooCommerceOrdersRepository implements all four methods. Custom order state
round-trips through 13 _kc_-prefixed order meta keys; the full mapping table
is documented on WooCommerceOrderMapper. Spec edits and stage advances PUT
only meta, so they can never mutate a price, a line item, or a customer
record. balanceDueCents is derived on read, never persisted, to avoid a
second source of truth.
- WooCommerceApiClient.updateOrder added in feature_wordpress — only
updateOrderStatus existed, which cannot carry meta.
Observability (Stage 16A layer):
- KcLogger injected into both repositories, defaulting to KcLogger.silent().
Domain rejections log at warning; API failures log at error with the status
code and originating exception.
- No silent catch (_) {} blocks — every swallowed error produces both a log
record and a failure result.
- Log context is limited to identifiers, operation names, and status names.
Customer identity, addresses, money amounts, and payment identifiers are
never logged, and all context additionally passes through KcRedactor.
- The deposit transaction ID is deliberately absent from both DepositInfo and
the WooCommerce meta mapping — it lives on PaymentResult alone, because
order meta is readable by any store administrator. Asserted by tests on both
the object and the outgoing request body.
Also closes P3.8: adds .metadata, CHANGELOG.md, LICENSE, and README.md to
feature_orders so it matches every other package (.gitignore already existed).
The README documents the pipeline, the meta mapping, and the privacy rules.
Deviations from the brief, recorded in the Stage 11A section:
- estimatedCompletionDate lives on CustomOrderSpec rather than Order, and
there is no separate updateEstimatedCompletion — a date revision goes
through updateCustomOrderSpec. Deferred for review in Stage 11C.
- internalNotes not added; Order.notes already serves that purpose.
Validation:
- 423 new tests in feature_orders (234 -> 657), including an exhaustive 7x7
legal/illegal transition matrix and coverage of every new repository method
on both implementations.
- 1,898/1,898 passing across all packages; no regression from the 1,475
baseline at 666abd2.
- dart analyze --fatal-infos clean across all 11 packages and apps.
- dart format --line-length 100 clean on every file touched by this slice.
Closes: P2.2 (domain + data portion), P3.8