Local processing
The runtime has no model or retrieval connection; review HTML uses a hash-bound script and a CSP with connect-src none.
Code references
engine/report.py:16render_reportengine/adapters/docassemble_map.py:377load_mapping
Legal ↔ Technical / Architecture map
Compare two versions of a legal form, review the field mapping and test both the filled values and the rendered pages before export.
Help a document-automation maintainer move field assignments to a revised form. A responsible reviewer still decides what the fields mean and which facts are required.
Current workflow review / 31 October 2026
A clean serial run passed all 158 engine tests on 31 October 2026, including the four previously intermittent paths. The synthetic demonstration rejects an incorrect mapping and an outdated approval, replays an accepted correction, and blocks a split field when a required fact is missing.
The map below describes its original snapshot. The note above covers later fixes and checks; older results below still belong to the earlier version.01 / Workflow
Read from left to right. Open a step to see why it matters, how it works, and where to find the code.
The maintainer provides old and new PDFs and a literal field mapping. The local adapter inventories fields and widgets and ties the review to the exact source files.
Legal ↔ TechnicalPreserve the record of what changed.
Bounded PDF subprocess inspection, SHA-256 identities and a restricted JSON or docassemble mapping adapter.
engine/cli.py:22prepareengine/adapters/pdf.py:386inspect_pdfengine/adapters/docassemble_map.py:377load_mappingThe test author supplies expected values and reference PDFs independently of the candidate output. Their source hashes, origins and oracle revision are recorded.
Legal ↔ TechnicalThe proposed mapping must not grade itself.
ReplayCase validation and counterfactual/value-domain coverage requirements.
engine/cases.py:19validate_caseengine/bundle.py:25_coverageThe engine proposes the field relationships it supports and keeps unresolved changes visible. It also prepares a reversible mapping patch for review.
Legal ↔ TechnicalDistinguish a structural match from a legal judgment.
Deterministic relation proposals and MigrationPlan validation; missing required mappings block readiness.
engine/relations.py:136proposeengine/migration.py:103make_planReplay checks filled values and rendered pages separately against the independent references. Incorrect or unsupported results cannot count as passing evidence.
Legal ↔ TechnicalCatch misplaced values and display failures before handoff.
Independent page-widget traversal plus PDFium rendering and bounded appearance comparison.
engine/replay.py:206replayengine/replay.py:141widget_valuesengine/proof.py:157render_compareA reviewer can change a destination or retire an optional binding, with a recorded reason. The page downloads a request tied to the plan; the CLI uses it to create a fresh review workspace.
Legal ↔ TechnicalRecord the person’s reason without silently removing a required obligation.
Offline selectors and revision JSON feed revise(); required bindings cannot retire and incompatible or colliding changes fail validation.
engine/report.py:16render_reportengine/cli.py:61reviseengine/migration.py:34_overridesengine/migration.py:59_retirementsThe workflow owner accepts or rejects the exact plan hash after reviewing source locations and unresolved items. Export still requires the unresolved-item and evidence checks to pass.
Legal ↔ TechnicalAcceptance belongs to a person and is specific to the reviewed change.
Approval JSON binds plan_sha256; a revision changes that hash and invalidates the old approval.
engine/migration.py:319approveengine/migration.py:330export_mappingApproval, source links, coverage and a fresh replay must all pass before export. The bundle contains the new mapping, rollback files, scoped labels and a regression runner; the live interview stays unchanged.
Legal ↔ TechnicalHandoff stays reversible and its verification scope remains visible.
Bundle construction reruns checks; verify-bundle recomputes artifacts and the exported runner repeats replay.
engine/bundle.py:153export_bundleengine/bundle.py:250verify_bundleengine/migration.py:356reverse_mapping02 / Implementation traces
7 grouped traces. The model and retrieval entries show which integrations run, which use local rules, and which are only configured.
Identify the supplied form before migration.
engine/cli.py:255mainengine/adapters/pdf.py:386inspect_pdfInspect exactly which form bindings are retained, proposed or unresolved.
engine/cli.py:22prepareengine/relations.py:136proposeengine/migration.py:103make_planengine/report.py:16render_reportAllow a maintainer to correct a one-to-one relation while recording rationale and retaining required bindings.
engine/report.py:16render_reportengine/cli.py:61reviseengine/migration.py:34_overridesengine/migration.py:59_retirementsRecord the workflow owner’s decision about one exact plan.
engine/report.py:16render_reportengine/migration.py:319approveengine/migration.py:330export_mappingCheck whether representative values reach intended places and remain visibly correct.
engine/replay.py:206replayengine/cases.py:19validate_caseengine/proof.py:157render_compareProvide a reversible, reviewable handoff that can be checked again.
engine/bundle.py:122RUNNERengine/bundle.py:153export_bundleengine/bundle.py:250verify_bundleengine/migration.py:356reverse_mappingTurn an accepted oracle correction into a new regression and reproduce narrow synthetic controls.
engine/cases.py:57capture_correctionengine/proof.py:264run_proofengine/cli.py:81demoAll ten top-level CLI commands, CLI help/version, the offline relation/approval view, the offline correction controls and the exported regression runner. Internal PDF worker commands are implementation details, not end-user surfaces.
Field/widget inventory and diagnostics.
Fresh source-bound review workspace.
Plan-bound changes in a new workspace.
Content-bound accept/reject record.
Logical and rendered outcome evidence.
Fresh verification and reversible export.
Accepted replacement oracle becomes a new case.
Recompute manifest and gate evidence.
Frozen synthetic corpus and controls.
Synthetic end-to-end migration and review example.
Argparse metadata.
Escaped source locations, evidence tables, patch and decision downloads.
Destination corrections, reasons and optional retirements.
Verify bundle, resolve portable cases and rerun replay.
03 / Review and permissions
The runtime has no model or retrieval connection; review HTML uses a hash-bound script and a CSP with connect-src none.
engine/report.py:16render_reportengine/adapters/docassemble_map.py:377load_mappingPDF inspection, filling and rendering run in subprocesses with input, output, time, object, page and pixel limits. CPU/file/file-descriptor caps are applied; the tested platform cannot enforce the requested data-segment cap.
engine/adapters/pdf.py:29_limitsengine/adapters/pdf.py:49_workerSource hashes, full plan hash, independent case commitments and new-output-only writes prevent stale evidence from silently authorizing a changed mapping.
engine/core.py:52write_newengine/migration.py:248validate_planengine/bundle.py:153export_bundleLabels describe relations verified within the included replay cases; retirement records an observed reviewer decision and does not verify legal removal.
engine/bundle.py:63_labelsengine/report.py:16render_report04 / Completion work
Every mapped old field now has a destination selector and rationale field, including required bindings. The page blocks duplicate selected destinations and missing reasons, disables acceptance after edits, and downloads a plan-bound revision request. Applying it creates a fresh plan; old approval cannot authorize the changed plan.
The engine already accepted overrides through a hand-authored decisions file, but the review page only authored retirements; maintainers could inspect ambiguity without correcting it in the same review workflow.
engine/report.pytests/test_review_overrides.pyREADME.mdpython3 -m unittest discover -s tests -p test_review_overrides.py -v3 tests exercised the emitted JavaScript using Node, downloaded requests, applied the CLI revision, and refused old approval, duplicate destinations and missing reasons.
python3 -m unittest discover -s tests -v (baseline before this change)155 tests passed in 555.491 seconds before the new review controls were added.
python3 -m unittest discover -s tests -p 'test_review*.py' -v9 current review tests passed, including the 3 new emitted-script/revision tests and all existing review/retirement tests.
python3 -m compileall -q engine testsCurrent Python sources compile.
python3 -m unittest discover -s tests -v (full post-change rerun)158 tests ran in 892.842 seconds: 154 passed, 1 failed and 3 errored. The relocated regression runner timed out after 60 seconds; reviewer-override bundle assembly and the CLI demo failed the independent-replay gate; a wrong-party-swap test could not find an expected PDF field (StopIteration). All 9 current review/control tests passed within this run. Causes beyond the explicit timeout were not isolated; no full current-suite pass or production release readiness is claimed.
PYTHONPATH=tests python3 -m unittest test_bundle.BundleTests.test_relocated_bundle_runs_without_original_reference_paths test_bundle.BundleTests.test_reviewer_override_binding_receives_verified_label test_replay.ReplayTests.test_wrong_party_swap_fails_despite_unchanged_field_count test_e2e.CliTests.test_demo_is_end_to_end_and_refuses_overwrite -vThe exact 4 previously failed/errored tests passed serially on the current source in 274.832 seconds. No source logic, assertions, timeouts or gates were changed. This limited rerun does not erase the earlier 154/158 full-suite result and is not a clean full-engine release run.
Bounded source and report-purity diagnosisBundle replay refuses at engine/bundle.py:202 before report generation at :229; engine/replay.py and the PDF adapter do not import or call engine.report. Five renders of both current and preserved original report.py left synthetic plan/inventory hashes unchanged. An isolated comparison copy differs only in report.py; replay, PDF adapter, migration, proof and bundle source are identical. No new-control product defect was isolated; the earlier broad-run failure cause remains unproven.
docassemble: Assembling documents ↗ livingVerified 26 October 2026. Describes attachment templates and itemized PDF fields; the local adapter implements only its documented static mapping subset.
These maps explain the software, its sources, and who reviews the results. Local and synthetic tests do not establish legal accuracy or readiness for production. The technical traces identify configured integrations and unfinished paths.