معماری چندکسبوکاری، تجاری و تجارت الکترونیک · فصل ۸ — PWA و Native App Decision · 278
Native App Decision Gate
Build a native-app decision gate that starts from required journeys and measurable capability gaps, carries forward the evidenced PWA limits from COM-036, compares web/PWA, native and bounded hybrid options, records distribution and lifecycle obligations, and authorizes native work only when the incremental requirement and total operating burden are explicit. میتواند «Native App Decision Gate» را برای یک workflow محدود با state/contract/approval و verification مناسب طراحی کند.
Lesson summary
Build a native-app decision gate that starts from required journeys and measurable capability gaps, carries forward the evidenced PWA limits from COM-036, compares web/PWA, native and bounded hybrid options, records distribution and lifecycle obligations, and authorizes native work only when the incremental requirement and total operating burden are explicit.
میتواند «Native App Decision Gate» را برای یک workflow محدود با state/contract/approval و verification مناسب طراحی کند.
This lesson produces
میتواند «Native App Decision Gate» را برای یک workflow محدود با state/contract/approval و verification مناسب طراحی کند.
Who it is for
Foundation
Use a field map, one worked scenario and explicit state vocabulary before independent construction.
Repair
Identify the failed evidence dimension, use the smallest mutated fixture and rerun only the affected gate.
Experienced
Compress definitions; require trade-off defense, counterexample analysis and changed-context transfer.
Prerequisites
First question: which required journey actually fails on the PWA path?
A product team says, “It is time to have a real native app.” Engineering replies, “A PWA is cheaper, so native is unnecessary.” Either statement can be wrong because both start with a solution label instead of an evidenced requirement.
This lesson reverses the sequence. Start with a concrete required_journey; bind current COM-036 evidence for install/offline/push/camera and any relevant capability; record the residual gap and fallback quality; then state the native capability delta and lifecycle burden separately. The output is neither pro-native nor pro-web. It is a PWA-vs-Native Decision Gate & Evidence Record v1 that a human reviewer can reproduce from visible evidence.
Lesson boundary
COM-037 owns the decision whether, why, and how narrowly a native/hybrid surface is justified. It does not own Service Worker, Push, Camera, or installability implementation; those evidence slices come from COM-036. It also does not define owner-exception governance; that belongs to AGN-001.
Three boundary rules:
- API or manifest presence is not capability parity.
- App Store availability is not proof that the product requires native.
- A prior approval is not permanent authority; browser/OS, cost, journey, or policy changes require re-running the gate.
Mental model: Requirement → Evidence → Gap → Option → Burden → Decision
| decision_id | required_journey | capability_requirement | pwa_evidence_ref | web_support_state | fallback_quality | native_capability_delta | background_requirement | hardware_integration_requirement | distribution_channel | store_policy_dependency | privacy_permission_surface | build_cost_class | ongoing_maintenance_class | support_burden | decision_state | review_trigger | evidence_ref |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| D-BASE-HYB | warehouse scan under intermittent connectivity | background scan + device integration | PWA-E-17 | PARTIAL | UNACCEPTABLE | NARROW_CLOSES_GAP | REQUIRED | REQUIRED | WEB_PLUS_MANAGED_MOBILE | LOW | BOUNDED | MEDIUM | MEDIUM | MEDIUM | HYBRID_APPROVED | browser/device integration materially improves | E-BASE-01 |
| D-NOGAP | same warehouse scan after browser release | background scan + device integration | PWA-E-24 | SUPPORTED | ACCEPTABLE | NONE_MATERIAL | SATISFIED_WEB | SATISFIED_WEB | WEB | NONE | CURRENT_WEB_ONLY | HIGH_AVOIDABLE | HIGH_AVOIDABLE | HIGH_AVOIDABLE | REJECT | re-open only on new required journey | E-TRANSFER-02 |
| D-HOLD | time-sensitive customer alert | reliable target push | PWA-E-MISSING | UNKNOWN | UNKNOWN | UNPROVEN | UNKNOWN | N/A | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | UNKNOWN | HOLD | collect target OS/permission evidence | E-HOLD-03 |
| D-NATIVE | field-worker capture + sync + low latency + device accessory | multiple persistent OS/device requirements | PWA-E-31 | UNSUPPORTED | UNACCEPTABLE | FULL_CLOSES_MULTIPLE_GAPS | REQUIRED | REQUIRED | APP_STORE_AND_MANAGED | MATERIAL_REVIEWED | REVIEWED_BOUNDED | HIGH | MEDIUM | MEDIUM | NATIVE_APPROVED | quarterly capability/cost review or support burden HIGH | E-NATIVE-04 |
Core flow:
required journeys → current PWA evidence → residual gap/fallback → compare PWA repair | narrow hybrid | full native → distribution/privacy/security/lifecycle gate → REJECT | HOLD | HYBRID_APPROVED | NATIVE_APPROVED → review/retirement trigger
If decisive evidence is UNKNOWN, DISPUTED, or STALE, the decision remains HOLD. NATIVE_APPROVED is not a preference; it is a state with auditable preconditions.
Keep four claim types separate
FACT — Web platform. Web App Manifest, Service Workers, Push API, and Media Capture are distinct mechanisms with different lifecycle, permission, implementation, and user-agent constraints. “We have a PWA” is therefore not evidence for every journey.
FACT — Distribution. Apple Guideline 4.2 currently expects App Store submissions to provide adequate utility and an experience beyond a merely repackaged website. That is a channel constraint, not an instruction to build native.
INFERENCE. If an important requirement cannot be met through the evidenced web/PWA path with an acceptable fallback, and a specific native delta closes that gap, a native or hybrid surface becomes easier to justify. If the gap disappears, another codebase and release/support lifecycle may be cost without outcome.
DESIGN — MAKNOW. The fields, typed states, local gates, and review triggers in this lesson are MAKNOW design choices, not vendor or W3C requirements.
The 26-field decision contract
The working record has twenty-six fields:
decision_id, required_journey, capability_requirement, pwa_evidence_ref, web_support_state, fallback_quality, native_capability_delta, background_requirement, offline_requirement, hardware_integration_requirement, performance_target, distribution_channel, store_policy_dependency, release_review_dependency, privacy_permission_surface, security_boundary, team_skill_constraint, build_cost_class, ongoing_maintenance_class, release_cadence, observability_requirement, support_burden, decision_state, exception_authority, review_trigger, evidence_ref.
Gate 1 — Write the required journey before the platform
“Warehouse users must continue hardware scanning under intermittent connectivity and produce traceable sync after reconnect” is actionable. “We need a mobile app” is not.
Gate 2 — Record PWA evidence capability by capability
pwa_evidence_ref must state what was actually tested or established on the target browser/OS mix. API presence, a vendor support page, or a desktop test is not enough by itself for the target mobile fleet.
Gate 3 — Keep support state separate from fallback quality
web_support_state can be SUPPORTED, PARTIAL, UNSUPPORTED, UNKNOWN, DISPUTED, or STALE. A PARTIAL capability can still have an ACCEPTABLE fallback, making native unnecessary; or an UNACCEPTABLE fallback, making the gap material.
Gate 4 — State the native capability delta precisely
Name what native actually adds: persistent background execution, hardware integration, a latency target, deeper OS integration, or another measurable change. An ambiguous delta produces an ambiguous approval.
Gate 5 — Separate background, offline, hardware, and performance
Do not collapse these into one “mobile capability.” Offline can be strong in the PWA while one hardware journey remains weak. In that case, a narrow companion can be superior to a full native rewrite.
Gate 6 — Treat distribution and review as independent constraints
App Store distribution has store-policy and release-review dependencies. Enterprise/direct distribution has a different set. Neither proves product fit on its own.
Gate 7 — Compare privacy and security surface
Record permission scope, local storage/secrets, device identifiers, deep links, background services, and attack surface added by the new option. More capability often means more operational and security surface.
Gate 8 — Separate build cost from recurring burden
One-time implementation is not the whole cost. ongoing_maintenance_class, release_cadence, observability_requirement, and support_burden remain visible. Two codebases, store releases, and an OS/device test matrix can change the decision.
Gate 9 — Prefer the smallest option that closes the real gap
Baseline options are PWA repair/fallback improvement, a narrow hybrid/native companion, and full native. If a small companion closes one hardware/background gap, a full native client needs additional evidence.
Gate 10 — Define review and retirement triggers
Every approval needs a trigger: browser capability change, OS policy change, support burden threshold, weak adoption, permission failure rate, store policy change, or a native delta that is no longer material.
Worked examples
1. Narrow residual gap → HYBRID_APPROVED
Checkout, catalog, and account management work well as a PWA. One warehouse journey needs background scanning plus hardware integration and the manual fallback creates operational error. A native companion closes only that journey; build and maintenance are medium and the success metric is explicit. HYBRID_APPROVED is defensible; full native is not.
2. Gap closes → REJECT
A later target-browser release closes the original constraint and the fallback becomes acceptable. Reusing the historical decision would keep native forever; re-running the gate shows no remaining native justification and moves toward REJECT/retirement.
3. Missing decisive evidence → HOLD
The team says push “does not work on customer devices,” but the target OS mix and permission evidence are missing. The correct decision is HOLD, not guessed NATIVE_APPROVED.
4. Full native only for multiple persistent hard requirements
Several critical journeys need background execution, tight latency, and hardware integration; fallbacks are unacceptable; native closes the documented gaps; privacy/security review is complete; recurring burden remains inside tolerance. NATIVE_APPROVED is defensible until a review trigger invalidates its assumptions.
Common failure modes
- Preference-first architecture: “I prefer native” or “web is always better” before evidence.
- API-presence parity: an API name is treated as proof of target support.
- Single-gap overreach: one narrow gap causes a full native rewrite.
- Store mystique: App Store presence is treated as automatic product justification.
- Fallback blindness: partial support is evaluated without fallback quality.
- One-time-cost bias: build cost is counted while releases, support, and observability disappear.
- Privacy/security omission: new capability is added without permission/security surface.
- Weighted-score theater: arbitrary points hide a hard constraint.
- Permanent approval: last year’s decision survives changed evidence.
- Forced success: incomplete evidence is coerced into an approval state.
Alternatives and trade-offs
PWA repair keeps one delivery surface and can ship quickly, but cannot close a target-platform gap that truly remains unsupported.
Narrow hybrid/native companion can deliver the best outcome-to-burden ratio for one device or background capability. It adds integration boundaries and cross-surface support complexity.
Full native can offer deeper device/OS integration but expands codebase, release process, store review, test matrix, and support burden. It is strongest when several persistent required journeys need that capability—not because “serious products are native.”
Do not collapse these trade-offs into one vague score. Some evidence is blocking, some decisive, and some merely advisory.
Experienced bridge: review questions
- Which required journey fails or degrades today?
- What is the exact target browser/OS evidence?
- Is the fallback acceptable, and by what metric?
- What measurable native capability delta closes the gap?
- Could a narrow companion close it instead?
- What distribution/review dependency is introduced?
- How does privacy/security surface change?
- What are build, maintenance, release, and support burdens?
- What success metric proves the new surface works?
- What trigger causes review, narrowing, or retirement?
If questions 1 or 4 have no precise answer, the team does not yet have an architecture decision; it has a preference.
Guided and independent practice
Run the offline lab:
python -B lab/COM-037-LAB1/learner/run_checks.py
Start with the baseline. Then mutate the evidence: remove the capability gap; double maintenance/support burden; add an OS-level requirement; make store review materially relevant; and mark decisive evidence UNKNOWN.
For transfer, assume a later browser release closes the previous gap while the native client becomes more expensive to support. Do not copy the baseline approval. Rebuild from required_journey and current evidence.
Verification evidence
The evaluator must catch at least:
NATIVE_APPROVEDorHYBRID_APPROVEDwith no real residual gap;- approval when decisive evidence is
UNKNOWN/DISPUTED/STALE; - approval without a clear native capability delta;
- full native when a narrow companion closes the gap with lower burden;
- an App Store label used as justification without utility/distribution evidence;
- a large maintenance/support increase without recomputation;
- transfer that treats the prior approval as an oracle.
The oracle is the visible fixture and deterministic rules, not hidden model reasoning, a live store, or production telemetry.
Assessment and transfer
The summative task requires four moves: explain the COM-037 boundary; build the complete baseline artifact; diagnose the mutation that removes the only native-justifying capability gap; and rebuild the changed-context decision from current evidence.
A strong answer does not merely name the final state. It shows which field was decisive, which evidence was blocking, which evidence was advisory, and what review trigger comes next.
References and freshness
W3C-APPMANIFEST— Web Application Manifest; rechecked 2026-09-14.W3C-SERVICE-WORKERS— Service Workers; rechecked 2026-09-14.W3C-PUSH— Push API; rechecked 2026-09-14.W3C-MEDIA-CAPTURE— Media Capture and Streams; rechecked 2026-09-14.APPLE-APP-REVIEW— App Review Guidelines, especially 4.2; rechecked 2026-09-14.LOCAL_DESIGN_AUTHORITY— frozen COM-037 Bible for fields and states.
Recheck Apple policy by 2026-11-02 and W3C/platform assumptions by 2026-12-31, or earlier after a material semantic change. No vendor document becomes MAKNOW decision authority.
Assessment
There is no answer key in this lesson pack; answer it yourself and mark honestly. "Needs review" sends the lesson to your review queue.
COM-037-S1 retrieval
Explain the COM-037 boundary and name one adjacent non-goal.
COM-037-S2 application
Build the complete decision record for the baseline fixture.
COM-037-S3 diagnosis
Remove the only capability gap that justified native and recompute.
COM-037-S4 transfer
A browser release closes the old gap while native support burden rises. Rebuild the decision.
Assessment rubric
A sufficient submission must satisfy all critical dimensions: boundary correctness; exact evidence binding; explicit negative evidence/non-success states; bounded decision no stronger than evidence; lifecycle/distribution/privacy-security trade-off visibility; and changed-context transfer rebuilt from current evidence.
References & freshness
Case studies
Lab files
تمام fixtureها مصنوعی و آفلاین هستند. در این پوشه python -B run_checks.py را اجرا کنید. evaluator تصمیم را فقط از fieldهای visible بازسازی میکند و هیچ شبکه، credential، store زنده، telemetry تولید یا answer key مخفی ندارد.