Files
dxdesigner-part-replacement/tools/random_packaged_acceptance.md
T

5.2 KiB

Frozen random acceptance

accept_random_packaged_ui.py runs the actual EXE through external Windows UIA. It imports no application service or source UI. Database access is SQLite mode=ro; fixture files are generated separately before launching the EXE.

The admitted final candidate, original hashes and intended roots are in outputs/completion-validation-20261111/frozen-random-final-plan.json. That file is a plan, not evidence of an executed test. Wait for the exclusive CAD/UI slot.

Prepare the final fixture once, from the repository root (Python):

import json, sys
from pathlib import Path
sys.path.insert(0, 'tools')
from accept_random_cad import prepare, workbook, fingerprint, write
p = json.loads(Path('outputs/completion-validation-20261111/frozen-random-final-plan.json').read_text(encoding='utf-8'))
assert fingerprint(Path(p['source']).parent) == p['source_hashes']
root = Path(p['root'])
m = prepare(root, Path(p['source']), json.loads(Path(p['graph']).read_text(encoding='utf-8')),
            p['target_parts'], count=p['count'], cells=p['cells'])
# No seed argument: draw from system randomness after tools stabilize.
# Existing independent baseline belongs to the unchanged original source.
m['baseline'] = p['graph']
write(root / 'manifest.json', m)
workbook(root, m)

With the CAD/UI slot granted, launch/import/save/confirm/execute/pause/resume:

python -X utf8 tools/accept_random_packaged_ui.py --exe outputs/completion-validation-20261111/app/DxPartReplace/DxPartReplace.exe --expected-sha256 0fb92b15ab57fa8765853ae63d0a7ef098280c21b40ec0e3768a726009e88015 --root outputs/completion-validation-20261111/frozen-random-final20 --stage execute --run-native

Then run independent native ASCII/Keyin verification, using the same slot:

python -X utf8 tools/accept_random_cad.py --root outputs/completion-validation-20261111/frozen-random-final20 --verify

The driver leaves its exact app process available for review. It never kills an app after a timeout. Continue only with that root's recorded --pid; attachment requires its existing process/EXE/hash binding. --stage import creates tasks and imports source drafts without executing a queue. Current candidate import persists pending_bom drafts immediately and defers CAD checks to execution.

Evidence: timestamped packaged-ui-report-*.json (including failures), EXE log, ui-session.json, packaged-recording/*/frame-*.png, actual queue/resource journals, desktop observation and independent report. A passed import report does not prove execution, pause/resume, or independent schematic correctness.

Supplemental controls implemented, awaiting an exclusive real CAD/UI slot:

  • Valid Cell: generator's --supplemental valid_cell --count 1; driver clicks the real rule dialog and loads/selects an authentic library Cell.
  • Force: generator's --supplemental force_stop --count 1; driver observes the worker stage, then click forceStopButton, confirm 强制结束当前操作, and perform recoverQuickRunButton / 核验并恢复. Never edit worker progress.
  • Resource: standalone fixture plus --resource-hold; test-owned external desktop reference only; after completed saved business, release that actor and click cleanupBatchResources. Preserve failure/success history and prove saved results were not executed again.
  • PON: prepare a separate pristine PON family/graph with authentic compatible --part-prefix and target parts. Normal directory/import/execution controls reuse this driver; no ordinary-family outcomes imply PON acceptance.

Review record

Normal completion requires queue phase finished, no running entries, settled supervisor journals, positive desktop/process release evidence, and a disabled UI stop control. Execute may legitimately be disabled after success. Independent schematic verification remains mandatory.

Pause is clicked only while a real entry runs after at least one completed entry. Resume waits for pending/paused entries and settled resources, uses the actual UI confirmation, and asserts unchanged queue filename, ordered task IDs and plan hashes. Previously saved UID event counts must remain unchanged.

Blocked/uncertain entries stop the normal driver. It never clears uncertainty, edits the DB, fabricates progress, retries failed work, or kills an app on timeout. Only the explicit force supplemental clicks force/recovery. Resource cleanup compares saved business-result hashes and saved UID counts before/after, without clicking Execute again. Missing real fault triggers fail acceptance.

The existing data-root option and process-local TEMP/TMP isolate the real EXE. Windows process image and expected EXE SHA256 establish identity. Attachment requires the isolated root's recorded PID/EXE/hash binding. Only UIA changes app state; original source fingerprints are checked before/after. Independent native observation checks CAD exit, desktop disappearance, foreground/input isolation and responsiveness. There is no source Qt window, service shortcut, DB mutation or simulated worker.

Verified scope: clean import-only on the old candidate. Supplemental and final candidate execution await actual runs; their implementation is not proof of CAD behavior.