NODEDC_1C/docs/ARCH/11 - architecture_turnaround/08 - current_status_audit_2...

8.9 KiB

08 - Current Status Audit (2026-04-17)

Purpose

This note is the honest execution snapshot for the turnaround package after the latest architecture passes, graph rebuild, and semantic acceptance work.

It is not a replacement for the phase documents.

It is the current-state audit that answers:

  • what is already real in code;
  • what still remains architectural debt;
  • how far the turnaround has actually progressed.

Audit Basis

This snapshot is based on:

  • graphify-out/GRAPH_REPORT.md rebuilt on 2026-04-17
  • current owner modules in llm_normalizer/backend/src/services/
  • current scenario acceptance scripts under scripts/
  • current AGENT semantic source catalog under docs/orchestration/

Graph Snapshot

Latest graph rebuild:

  • 5228 nodes
  • 11338 edges
  • 133 communities

Most relevant current god nodes for turnaround 11:

  1. resolveAddressIntent()
  2. ChannelRegistry
  3. composeFactualReply()
  4. CanonicalStore
  5. compactWhitespace()

The relevant conclusion is not that every god node is part of turnaround 11.

The relevant conclusion is:

  • resolveAddressIntent() remains the main unresolved domain-intent concentration point;
  • composeFactualReply() remains the main unresolved answer-shaping concentration point;
  • assistantService still appears as a large coordinator-heavy community rather than a thin shell.

What Is Already Real In Code

1. Policy owners are no longer hypothetical

The following owner modules exist and are live architectural objects:

  • assistantRoutePolicy.ts
  • assistantTransitionPolicy.ts
  • assistantBoundaryPolicy.ts
  • assistantMetaFollowupPolicy.ts
  • assistantMemoryRecapPolicy.ts
  • assistantProviderExecutionPolicy.ts

assistantService.ts wires these owners in active runtime paths around:

  • provider policy creation near line 4725
  • route/meta/memory policy creation near lines 4738-4783
  • transition policy creation near line 4785
  • boundary policy creation near line 5439

2. Truth and coverage/evidence are explicit contracts

The exact lane now exposes explicit machine-readable contracts:

  • address_truth_gate_v1
  • address_coverage_evidence_v1

Primary current owners:

  • addressTruthGatePolicy.ts
  • addressCoverageEvidencePolicy.ts
  • assistantRuntimeContractResolver.ts
  • assistantTruthAnswerPolicyRuntimeAdapter.ts

This means exact-lane answers are no longer judged only by final text or hidden heuristics.

3. Scenario acceptance is now a real gate artifact

The truth harness now writes:

  • scenario_acceptance_matrix.json
  • scenario_acceptance_matrix.md
  • pack_state.json
  • final_status.md

Primary current owners:

  • domain_truth_harness.py
  • scenario_acceptance_policy.py

This is the main reason the project is no longer relying on unit tests alone for architecture verification.

4. Mixed AGENT semantic source material already exists

Current source catalog snapshot:

  • truth_harness_steps_total = 58
  • saved_session_questions_total = 81

The source catalog already covers mixed reusable tags such as:

  • inventory_root
  • selected_object
  • selected_object_supplier
  • counterparty_documents
  • counterparty_shipment_fallback
  • settlements_account_60
  • settlements_receivables
  • vat
  • meta_smalltalk
  • meta_scope
  • meta_capability
  • meta_historical_capability
  • meta_memory
  • same_date_pivot
  • same_date_restore

This is enough to build targeted semantic packs that are not single-domain toy scripts.

Honest Phase Status

Estimated overall turnaround completion: ~85%

Phase 0. Shared Baseline

Status: 100%

Reason:

  • architecture vocabulary is stable;
  • planning discussions already use the package and current owner names.

Phase 1. Formal Layer Separation

Status: 100%

Reason:

  • subsystem boundaries are explicit enough in planning and in code ownership;
  • canonical_layer, llm_normalizer/backend, and domain loop/orchestration assets are no longer treated as one blob.

Phase 2. State And Transition Contracts

Status: 92%

Reason:

  • root, selected-object, same-date, and carryover classes are materially operational;
  • transition policy is extracted;
  • scenario acceptance now evaluates continuity explicitly.

Remaining debt:

  • legacy transition helpers still physically exist inside assistantService.ts;
  • not every follow-up family is represented as equally clean first-class transition taxonomy.

Phase 3. Capability Contracts

Status: 86%

Reason:

  • critical inventory/address capabilities are materially contract-driven;
  • selected-object and root capability behavior is much more explicit than before.

Remaining debt:

  • resolveAddressIntent() is still too central;
  • some business contours outside the most exercised inventory/address scenarios remain less explicit.

Phase 4. Coverage / Evidence / Truth Gate Isolation

Status: 84%

Reason:

  • explicit truth and coverage/evidence contracts exist;
  • answer policy reads those contracts rather than rebuilding verdicts blindly from raw rows.

Remaining debt:

  • composeFactualReply() is still a major concentration point;
  • humanized blocked/limited semantics are not yet fully separated from final packaging logic across all paths.

Phase 5. AssistantService Extraction

Status: 76%

Reason:

  • major policy categories have real owners outside the coordinator.

Remaining debt:

  • assistantService.ts is still about 5770 lines;
  • runtime uses extracted owners, but legacy bodies and fallback branches still live in the coordinator file;
  • code review still sometimes requires reading assistantService together with extracted owners.

Phase 6. Provider / Runtime Axis Hardening

Status: 80%

Reason:

  • provider/runtime behavior is now an explicit policy concern;
  • local/openai semantics are materially less entangled with business routing.

Remaining debt:

  • compatibility is stronger than before, but not yet the final universal execution contract for every contour and acceptance pack.

Phase 7. Scenario Acceptance As Primary Gate

Status: 90%

Reason:

  • acceptance writes first-class artifacts;
  • AGENT source catalog and mixed packs exist;
  • meta-space, domain-space, and cross-domain interruptions are already represented.

Remaining debt:

  • semantic replay remains intentionally tool-driven and script-driven rather than promoted to a mandatory UI-first loop;
  • coverage breadth should continue to grow as new domain slices are hardened.

What Has Improved Relative To The Original State

Compared with the pre-turnaround baseline, the system is now materially better in the following ways:

  • long mixed conversations are more stable;
  • selected-object continuity is no longer treated as optional polish;
  • temporal honesty is now evaluated as an explicit invariant;
  • factual-negative answers can remain truthful instead of collapsing into generic technical refusals;
  • meta questions and memory recap are no longer purely incidental side effects of route logic;
  • architecture regressions can now be localized to route, transition, truth gate, coverage/evidence, boundary, or meta/memory layers.

What Still Remains The Main Architectural Debt

1. assistantService.ts is still too large

The extracted owners are real, but the coordinator has not yet been fully reduced to a thin orchestration shell.

2. resolveAddressIntent() is still too central

Intent resolution remains one of the most connected business nodes in the graph.

This means capability and contour growth still concentrate pressure there.

3. composeFactualReply() is still too central

Truth contracts are now explicit, but final answer-shaping still retains too much architecture weight.

This is the main remaining reason why user-facing humanization and limitation semantics are not completely isolated yet.

4. Coverage breadth is stronger, but still selective

The project is now strong on:

  • inventory root
  • selected-object provenance/documents
  • counterparty document and shipment-fallback cases
  • key settlement and VAT follow-ups
  • meta/memory/context integrity

But not every business family has reached the same contract maturity.

The next honest architecture slice should be:

  1. continue reducing assistantService.ts to a thinner coordinator;
  2. isolate answer-shaping semantics further away from composeFactualReply();
  3. keep extending AGENT packs with mixed business + meta + interruption patterns instead of single-family smoke tests;
  4. keep using scenario acceptance as the main sign-off rather than unit-test green status alone.

Bottom Line

Turnaround 11 is no longer a proposal.

It is an operational architecture program that is already mostly implemented in the critical path.

The current state is best described as:

  • architecturally real
  • operationally useful
  • not yet fully cleaned up

The remaining work is now mostly about:

  • removing residual concentration points;
  • tightening the last humanized answer-policy seams;
  • and broadening acceptance coverage without regressing the hard-won exact-data behavior.