feat: complete native BOM and Harness execution acceptance

This commit is contained in:
阿白叔 committed 2026-11-12 19:21:55 +08:00
1 parent 4f8fbd7806
commit 65438cb7e5
234 files changed
+24402 -865

No files matched your search

+16
View File
@@ -35,6 +35,22 @@ def test_persists_actual_values_and_rejects_later_terminal_job(tmp_path):
assert load_value_readback(tmp_path, row, outcome)['value_readback_status'] == 'rejected'
@pytest.mark.parametrize('actual_value,expected_state', [
('10nF/NC', 'verified'), ('10nF', 'rejected'), ('10nF/NC/NC', 'rejected')])
def test_readback_does_not_accept_lost_leading_nc_marker(tmp_path, actual_value, expected_state):
from dx_productivity.trial_task_center.value_readback import capture_value_readback
row, raw = case(tmp_path)
row['target_selectors'] = 'u1\x1fR1\x1fNC/402K/1%'
snapshot = 'C\tu1\tR1\t0\t0\t0\t1\tNO_PINS\r\nA\tu1\tValue\tNC/402K/1%\t\t0\t0\t0\t0\t10\t0\t1\r\n'
(tmp_path / 'snapshot-job.tsv').write_bytes(snapshot.encode())
header = ['V', '2', 'task', 'job', 'saved_ok', row['project_path'], 'MAIN', '1', 'OLD', 'NEW',
'custom', '10nF', '1', 'CELL', row['target_selectors'], snapshot]
records = [header, ['C', 'u1', 'R1', 'NEW', actual_value, '1', 'CELL']]
raw.write_text('\n'.join('\t'.join(map(enc, record)) for record in records) + '\n', encoding='utf-8')
result = capture_value_readback(tmp_path, row, ('saved_ok', 'batch_closed', 'verified'))
assert result['value_readback_status'] == expected_state
@pytest.mark.parametrize('fault', ['uid', 'policy', 'snapshot', 'foreign_job', 'version', 'cell', 'pn', 'value'])
def test_readback_rejects_foreign_or_stale_report(tmp_path, fault):
from dx_productivity.trial_task_center.value_readback import capture_value_readback