Phase 160FAEDA-SEED-IMPORT-APPROVAL-001technical design only

Importer Technical Design Documentation

Documentation-only technical design for a future seed importer. It defines architecture, contracts, safety gates, and failure handling without creating runtime importer code.

Design sections

8

architecture, data, validation, audit, failure, testing

Runtime services

0

no service or worker created

Write contracts

0

no database writer approved

Blocked mutations

10

Phase 156-159 locks remain

Purpose

Documentation becomes technical design, not runtime

Phase 160 translates the approved seed-import idea into architecture lanes, draft contracts, validation sequence, failure modes, and test expectations. It prepares engineers for a future scope review without executing any import.

Runtime lock

No importer, no writer, no financial shortcut

The future importer remains blocked from PO, GRN, inventory, invoice, ledger, wallet, payout, settlement, confirmed order, and runtime import mutation until later approved gates exist.

Architecture lanes

How a future importer must be split

Demo Ops

Input lane

Accept a seed pack envelope and readiness evidence for validation planning.

Inputs

seed pack envelopedry-run reportreadiness reportapproval packet

Outputs

normalized import plan draftno-write validation checklist

Blocked

Cannot accept production tenant payload or unsafe mutation request.

Backend Architecture

Validation lane

Define the validation stages a future importer must pass before any write is even considered.

Inputs

schematenant scopeidempotency keysdependency graphpermission rules

Outputs

pass/warning/block matrixmissing dependency report

Blocked

Cannot bypass backend permission or maker-checker approval.

Product Truth

Mapping lane

Map seed groups to existing backend concepts without merging operational truth into product identity.

Inputs

master productsupplier offermanufacturer needlisting draftdemand draft

Outputs

entity mapping planrelationship mapping plan

Blocked

Cannot map shop listing as inventory or customer demand as order.

Future Engineering

Persistence lane

Document what a later writer might need, while keeping Phase 160 no-write.

Inputs

approved technical designfuture implementation ticket

Outputs

future writer contract draft only

Blocked

Cannot create tables, services, queues, workers, jobs, or migrations.

Governance

Audit lane

Define request ids, actor ids, reviewer notes, retained evidence, and report packets.

Inputs

approval packetdry-run reportreview decision

Outputs

audit event planevidence retention plan

Blocked

Cannot silently approve or delete blocked evidence.

Security Review

Security lane

Define threat controls for cross-tenant imports, mutation injection, fake wallet claims, and permission bypass.

Inputs

risk matrixmutation lockstenant policy

Outputs

security control checklistabuse scenario list

Blocked

Cannot relax financial, inventory, ledger, or customer-data boundaries.

Draft contracts

Named shapes only

These are documentation names for future review. They are not DTOs, database models, route handlers, or queue messages.

SeedImportPlanDraft

planIdpackIdtenantScopemoderequestedBycreatedAtnoWrite

Plan draft is metadata only and cannot be executed.

SeedEntityMappingDraft

mappingIdsourceEntitytargetConceptdependencyRefsconfidencewarnings

Mapping draft cannot create linked operational records.

SeedValidationReport

reportIdplanIdpassedCheckswarningsblockersblockedMutations

Validation report stays advisory until a future implementation gate exists.

SeedImportAuditPacket

auditIdrequestIdmakerIdcheckerIddecisionreasonretentionPolicy

Audit packet cannot replace backend auth, legal, or finance approval.

Validation pipeline

Future importer cannot skip these checks

01

Load approved design evidence

Read source pack, dry-run report, readiness desk decision, and maker-checker approval packet.

Stop if evidence chain is missing.

02

Normalize envelope

Normalize schemaVersion, packId, tenantScope, importPolicy, entities, relationships, and blockedMutations.

Stop if schema is unknown.

03

Verify tenant and mode

Confirm demo_only scope and design-only mode before any future runtime is considered.

Stop if scope is production, cross-tenant, or unclear.

04

Resolve idempotency keys

Compare stable seed keys and decide create, compare, skip, or conflict behavior in documentation.

Stop if duplicate handling is undefined.

05

Validate dependency graph

Check product, actor, RFQ, quote, listing, demand, logistics, and payment-evidence ordering.

Stop if downstream records appear before upstream truth.

06

Apply mutation locks

Reject PO, GRN, inventory, invoice, ledger, wallet, payout, settlement, and confirmed order mutation requests.

Stop if any runtime mutation is requested.

07

Generate design report

Produce design readiness, warnings, open questions, and future implementation checklist.

Report only; no writer is produced.

Failure modes

What must stop the importer path

critical

Cross-tenant payload

Detection

tenantScope is not demo_only or does not match approved scope.

Response

Block design progression and archive evidence.

critical

Runtime mutation injection

Detection

Payload contains any blocked mutation such as wallet.balanceMutate or inventoryMovement.post.

Response

Reject request, require security note, and preserve report.

medium

Duplicate seed ambiguity

Detection

Stable keys exist but conflict behavior is missing or contradictory.

Response

Request design changes before implementation planning.

high

Permission gap

Detection

Backend role required for a future step is not specified.

Response

Block approval until permission owner is defined.

medium

Graph orphan

Detection

A downstream record has no source entity or dependency reference.

Response

Mark as missing dependency and stop writer design.

Testing plan

Evidence expected before coding

Golden seed pack

Pass with warnings only, no write target produced.

Duplicate pack re-run

Report duplicate-safe comparison behavior, no duplicate creation.

Cross-tenant mutation attempt

Critical block before mapping or persistence planning.

Missing master product

Dependency block before listing, demand, or payment evidence planning.

Permission unavailable

Warning or block until backend permission owner is defined.

Documentation checklist

Definition of done for this phase

1

Purpose and non-goals are stated.

2

Source evidence chain is linked.

3

Architecture lanes are defined.

4

Draft contracts are named without implementing code.

5

Validation pipeline is ordered.

6

Failure modes and responses are documented.

7

Testing plan is documented.

8

All runtime mutation locks remain active.

9

No service, API, worker, queue, migration, or database writer is created.

Technical design packet

JSON preview

{
  "technicalDesignId": "seed_importer_tdd_001",
  "phase": "Phase 160",
  "sourceApprovalGate": "FAEDA-SEED-IMPORT-APPROVAL-001",
  "sourceApprovalPacket": "seed_import_approval_gate_001",
  "designOnly": true,
  "noRuntimeImporter": true,
  "noDatabaseWrites": true,
  "noMigrations": true,
  "architectureLanes": [
    "Input lane",
    "Validation lane",
    "Mapping lane",
    "Persistence lane",
    "Audit lane",
    "Security lane"
  ],
  "draftContracts": [
    "SeedImportPlanDraft",
    "SeedEntityMappingDraft",
    "SeedValidationReport",
    "SeedImportAuditPacket"
  ],
  "validationSteps": [
    "Load approved design evidence",
    "Normalize envelope",
    "Verify tenant and mode",
    "Resolve idempotency keys",
    "Validate dependency graph",
    "Apply mutation locks",
    "Generate design report"
  ],
  "blockedMutations": [
    "purchaseOrder.issue",
    "goodsReceipt.approve",
    "inventoryMovement.post",
    "supplierInvoice.accept",
    "threeWayMatch.autoApprove",
    "payable.approve",
    "partnerPayment.execute",
    "ledger.post",
    "wallet.balanceMutate",
    "customerOrder.confirm"
  ],
  "nextAllowedGate": "implementation_scope_review_only"
}

Hard rules

Phase 160 cannot mutate FAEDA

1

Phase 160 creates documentation only.

2

No route handler, API endpoint, backend service, worker, queue, cron, migration, or database writer may be created here.

3

Technical design cannot approve runtime import execution.

4

Technical design must preserve all Phase 156-159 mutation locks.

5

Next gate can review implementation scope only; it still must not run an importer.

Next build gate

Phase 161-170 should be role functional readiness

The next safe step is a combined role readiness sprint: scope review, QA matrix, demo personas, permissions, dashboards, workbenches, seed binding, and functional-lite role checks.

Open role readiness