P22 preserved finalization exact tree probe
This commit is contained in:
@@ -2,11 +2,17 @@
|
||||
|
||||
原30パッケージ/88成果・部分点なしを維持する。614 identityは360施設、176人物、2状態群、76その他であり、614画像ではない。495 candidate、119 missing、19 sourceを全て保持する。選定済完成資産は0。D08/D09の最終内容・数量はunknown。
|
||||
|
||||
asset-contracts.jsonは公開JSON共有参照(d/l/s/r)で、accepted_inputの全フィールドとcurrent契約の全フィールドを損失なく保持する。各identityの命名はid、候補名はcandidate_refの実path、形式と現raw SHAはcandidate_pool、historical適用性はcandidate_refs、creatorと不足は各契約にある。差替鎖は歴史的representation→現candidate→未選定replacement。missingをcode/file/fallbackで充足しない。最終の解像度・frame/layout・命名・差替参照は未確定として扱う。
|
||||
asset-contracts.jsonはp22-reference-contract-v2形式。immutable accepted input/current/evidenceをpathとraw SHAで参照し、全フィールドを損失なく再構成する。accepted inputのd/l/s/rをdecodeし、歴史的契約と現selections/source_pins/unit_proofsを分離する。missingをcode/file/fallbackで充足しない。最終の解像度・frame/layout・命名・差替参照は未確定。
|
||||
|
||||
Kenney Tiny Town/Tiny Dungeon/Interface Soundsのpublisher/member/license/manifest証拠はevidence_pinsの文書を完全再利用する。配布元URLとCC0記録はcandidate_poolおよび既存ライセンス証拠を参照。内部BGM合成recipeは内部由来であり、第三者CC0や最終聴感・権利受入へ昇格しない。自己制作・別許諾を排除しない。未知creator/rightsを推測しない。
|
||||
|
||||
checkerの通常0終了は記録整合性のみ。--require-readyは原条件未達なら2終了。READYには空でない完成資産、全exact useの選定・実利用・権利、未制作/開示不足の解消、必要な画面/聴感、Root静的検証と意味のあるnegative、独立Opusレビュー、統合・最終受入が必要。workerは正式試験も受入も主張しない。
|
||||
checkerの通常0終了は記録整合性のみ。validation_readyには全exact useの使用可能選定資産・権利・必要な画面/聴感証拠とmandatory_scope/disclosure証拠が必要。独立レビュー・統合・最終受入を技術的readinessの事前ゲートにはしない。原成果受入には別途Root正式検証・意味のあるnegative・独立Opusレビュー・統合・finalが必要。
|
||||
|
||||
ローカル限定確認: python3 -Bで13テスト合格、ordinary exit 0、require-ready exit 2。614 pending、0 selected、19 candidate sources、disclosure/mandatory_scope不足。record_integrity=true、validation_ready=false、acceptance_claimed=false。正式試験・原成果受入は主張しない。
|
||||
|
||||
契約spec SHAはstdout.stripのUTF-8に対するf252de3c5cff7ebfa62322ae2f2df09fb80a44bc59eb286b76d4acb4c12ca875。raw SHA c26c0b12cf7e7a7c46e671acde2e00762904732c1cd6381a53836e3d7b3f9824との差は末尾改行のみ。
|
||||
|
||||
完全パケットの最終実測は未確認。指定patchと計測evidence/proposalがこのworktreeに存在せず、通常制作ディレクトリはアクセス拒否。487283はprospective値であり実測値として扱わない。500000未満の確認は未充足。
|
||||
|
||||
## 次の製品変更提案(この実装では適用しない)
|
||||
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
# Root actual preflight and final bounded repair
|
||||
|
||||
{
|
||||
"action": "request-repair",
|
||||
"task_id": "P22-02",
|
||||
"reason": "The Root preflight of c6ccc5a6 found three required defects (recorded in checkpoints/p22-02-slot-contract-r02/actual-checker-and-packet-preflight-r02.json). This uses the last ordinary repair (1 used, limit 2). Fix only within allowed_paths: execution/p22-02/** and tools/check_p22_asset_contracts.py. Do not change the spec, inputs, Root checkpoint, cap, contracts, registered validation argv, permissions, or Core.\n\n(1) The checker exits 2 on the exact registered argv `--verify-only --accepted-input docs/spec/inputs/P22-02-accepted-usage.json --require-ready`. Add argparse support for `--verify-only` and `--accepted-input` without changing the registration. Keep it read-only.\n\n(2) Readiness is hardcoded to always fail, which the spec forbids. The check forces selected_assets==[], asserts all 8 original_conditions are False before computing ready with all(values), and forces ledger.current to equal the frozen all-unmet snapshot. Remove these. Keep every field of the frozen accepted input, all 614 original identities and the source observations. Verify the new current, selection and actual evidence separately, and derive ready from that real data. Reject fake booleans, file-presence-only proof and promoted fallbacks. The current ledger is genuinely short of 614, so the real P22 run must still return a nonzero readiness exit.\n\nKeep validation-ready separate from original-completed. Formal validate covers the technical readiness of function, assets, rights and the required usability. Original acceptance comes later, through a separate review, then integration, then final. Remove the cycle that puts independent review or integration completion as a gate before validation. Do not record original acceptance ahead of time.\n\nProve reachability with pure functions: one isolated positive readiness case, plus negatives for wrong proof, wrong quantity and wrong pin. Apply meaningful negatives to: missing, duplicate and stale sources; dimension, layout, license and rights mismatches; counterfeit final; quantity; codec bool-as-index; cycles; duplicate keys; NaN/Inf; and path escape. Don't reject only sample mutations, and don't use a gate that requires the whole checkpoint to equal a mirror.\n\n(3) The exact unchanged Runner packet is actually 1,350,690 bytes; the worker's 472,408 figure was wrong. It must be under 500,000 bytes, counting the full diff, all sources, the registered validation_sources (the checker plus the 217 KiB accepted input) and the tests. Don't re-embed the whole accepted_input or the roughly 1.5 MB current data in the ledger. Rebuild losslessly from the existing immutable inputs, referenced by raw SHA, decoded semantic hash, or file plus identity. Keep all 19 candidate sources, each of the 614 selections, and every gap and required field. Cut the output down with shared profiles, text and contracts. Don't extend the Core's P13-only dedup to P22.\n\nRun python -B with ast.parse only; no engine or full regression. Return submitted with the exact list of incomplete original-unit conditions. Do not claim P22-02 acceptance. No duplicate worker and no new registration.",
|
||||
"codex_model": "gpt-6-astra",
|
||||
"codex_model_reason": "This is the last ordinary repair, so a failure leaves no fallback. The work is hard: three defects at once, redesigning the readiness logic so it is reachable but still fails nonzero on the real data, untangling the validate/review/integration cycle, and a lossless decoder rebuild that shrinks the packet from 1.35 MB to under 500 KB. It also needs many meaningful negatives. The previous worker misreported the packet size and shipped always-fail logic, which suggests the default model underestimates this task. Astra's quality is worth its extra time and usage."
|
||||
}
|
||||
|
||||
No spec/input/core/cap changes. Preserve every accepted input field through immutable references, not a second embedded mirror. Exact Root packet body is in artifacts as diagnostic only; normal Runner packet uses full diff and source with validation sources, no P22 added-doc dedup. Current real readiness remains nonzero, but valid future proof must be able to reach readiness without assuming prior final integration. Root will check the exact body again before any reviewer launch.
|
||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,8 @@
|
||||
"""Build only the authorized ledger, preserving complete JSON fields."""
|
||||
"""Initialize a compact ledger. Not invoked by read-only verification.
|
||||
|
||||
All historic fields are retained by raw-SHA references. This initializer
|
||||
replaces selection work; never use it to refresh pins after a source change.
|
||||
"""
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
@@ -9,67 +13,21 @@ INPUT = 'docs/spec/inputs/P22-02-accepted-usage.json'
|
||||
CURRENT = 'docs/plans/original-completion-2026-10-02/checkpoints/p22-02-slot-contract-r02/all-slot-current-candidate-contracts.json'
|
||||
EVIDENCE = 'docs/plans/original-completion-2026-10-02/checkpoints/p22-02-current-contract-r01'
|
||||
|
||||
|
||||
def build():
|
||||
keys, strings, pool = [], [], []
|
||||
key_ids, string_ids, object_ids = {}, {}, {}
|
||||
def key_id(key):
|
||||
if key not in key_ids:
|
||||
key_ids[key] = len(keys)
|
||||
keys.append(key)
|
||||
return key_ids[key]
|
||||
def encode(value):
|
||||
if isinstance(value, str):
|
||||
if value not in string_ids:
|
||||
string_ids[value] = len(strings)
|
||||
strings.append(value)
|
||||
return ['s', string_ids[value]]
|
||||
if isinstance(value, (dict, list)):
|
||||
signature = json.dumps(value, ensure_ascii=False, sort_keys=True, separators=(',', ':'))
|
||||
if signature in object_ids:
|
||||
return ['r', object_ids[signature]]
|
||||
if isinstance(value, dict):
|
||||
node = ['d']
|
||||
for key, item in value.items():
|
||||
node.extend([key_id(key), encode(item)])
|
||||
else:
|
||||
node = ['l'] + [encode(item) for item in value]
|
||||
index = len(pool)
|
||||
pool.append(node)
|
||||
object_ids[signature] = index
|
||||
return ['r', index]
|
||||
return value
|
||||
pins = {}
|
||||
for path in [ROOT / CURRENT, *sorted((ROOT / EVIDENCE).iterdir())]:
|
||||
if path.is_file():
|
||||
pins[str(path.relative_to(ROOT))] = hashlib.sha256(path.read_bytes()).hexdigest()
|
||||
paths = [INPUT, CURRENT] + [str(p.relative_to(ROOT)) for p in sorted((ROOT / EVIDENCE).iterdir()) if p.is_file()]
|
||||
pins = {p: hashlib.sha256((ROOT / p).read_bytes()).hexdigest() for p in paths}
|
||||
current = json.loads((ROOT / CURRENT).read_text())
|
||||
ledger = {
|
||||
'accepted_input': json.loads((ROOT / INPUT).read_text()),
|
||||
'current': json.loads((ROOT / CURRENT).read_text()),
|
||||
'evidence_pins': pins,
|
||||
'original_conditions': {
|
||||
'all_exact_uses_selected_and_usable': False,
|
||||
'all_creator_and_rights_evidence_accepted': False,
|
||||
'all_naming_resolution_layout_replacement_references_accepted': False,
|
||||
'all_mandatory_unmade_and_disclosure_gaps_resolved': False,
|
||||
'applicable_display_and_hearing_evidence': False,
|
||||
'independent_opus_review': False,
|
||||
'root_static_and_meaningful_negative_validation': False,
|
||||
'integration_and_final_original_30_88_acceptance': False,
|
||||
},
|
||||
'selection_contract': {
|
||||
'selected_assets': [],
|
||||
'candidate_names': 'Exact candidate_pool path names; no rename or final assignment',
|
||||
'replacement_chain': 'Accepted historical representation -> current candidate_ref (prior applicability retained) -> selected replacement UNKNOWN',
|
||||
'format': 'candidate_pool observed_format for physical media; representation_kind and exact raw source for code. Final per-use format/layout UNKNOWN.',
|
||||
'rights': 'candidate_pool rights_provenance and complete pinned publisher/license/manifest evidence; internal recipe is origin only, not final rights or hearing acceptance',
|
||||
'quantity': 'D08/D09 UNKNOWN. 2 state groups are not images. Never infer final file/frame/variant counts from 614 identities.',
|
||||
},
|
||||
'schema': 'p22-reference-contract-v2',
|
||||
'references': pins,
|
||||
'reconstruction': 'All accepted codec fields and snapshot fields retained by raw SHA; selections inherit entire snapshot contracts by identity, including every unmade condition.',
|
||||
'selections': {c['id']: ('candidate' if c['candidate_refs'] else 'missing') for c in current['contracts']},
|
||||
'source_pins': {p: f['current_raw_sha256'] for p, f in current['candidate_pool'].items()},
|
||||
'unit_proofs': {},
|
||||
}
|
||||
files = encode(ledger)
|
||||
packet = {'keys': keys, 'strings': strings, 'pool': pool, 'files': files, 'encoding': 'd=flat key-id/value; l=list; s=string index; r=complete object/list index'}
|
||||
raw = json.dumps(packet, ensure_ascii=False, separators=(',', ':')).encode() + b'\n'
|
||||
(HERE / 'asset-contracts.json').write_bytes(raw)
|
||||
print(json.dumps({'ledger_bytes': len(raw), 'formal_tests': 'not_run'}))
|
||||
(HERE / 'asset-contracts.json').write_text(json.dumps(ledger, ensure_ascii=False, indent=2) + '\n')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
build()
|
||||
|
||||
@@ -0,0 +1,195 @@
|
||||
"""Runner-owned tests. No file writes, product execution, or real PASS from fixtures."""
|
||||
import copy
|
||||
import importlib.util
|
||||
import io
|
||||
import json
|
||||
from pathlib import Path
|
||||
import sys
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
sys.dont_write_bytecode = True
|
||||
ROOT = Path(__file__).resolve().parents[5]
|
||||
spec = importlib.util.spec_from_file_location('p22_checker', ROOT / 'tools/check_p22_asset_contracts.py')
|
||||
m = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(m)
|
||||
|
||||
|
||||
class ContractTests(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.ledger = m.read(m.OUT + 'asset-contracts.json')
|
||||
cls.accepted = m.read(m.INPUT)
|
||||
_, cls.records = m.accepted_records(cls.accepted)
|
||||
cls.snapshot = m.read(m.CURRENT)
|
||||
|
||||
def rejected(self, function, *args):
|
||||
with self.assertRaises((ValueError, OSError, KeyError, TypeError)):
|
||||
function(*args)
|
||||
|
||||
def proof(self, kind, subject):
|
||||
return {'kind': kind, 'subject': copy.deepcopy(subject), 'result': 'accepted',
|
||||
'issuer': {'role': 'root', 'name': 'isolated fixture; never P22 evidence'},
|
||||
'observations': [{'explanation': 'Synthetic pure-function observation only',
|
||||
'anchors': [{'path': 'synthetic.txt', 'sha256': 'a' * 64,
|
||||
'line': 1, 'text': 'synthetic'}]}]}
|
||||
|
||||
def fixture(self):
|
||||
row = {'slot_id': 'isolated', 'usage_condition': 'isolated pure function only',
|
||||
'required_file_count': 1}
|
||||
fmt = {'png_width': 16, 'png_height': 16}
|
||||
sources = {'synthetic.png': {'sha256': 'a' * 64, 'format': fmt}}
|
||||
asset = {'path': 'synthetic.png', 'sha256': 'a' * 64, 'format': copy.deepcopy(fmt),
|
||||
'region': [0, 0, 16, 16], 'code_anchor': None, 'kind': 'image'}
|
||||
return row, sources, asset
|
||||
|
||||
def test_isolated_reachable_and_wrong_proof_quantity_pin(self):
|
||||
row, sources, asset = self.fixture()
|
||||
m.asset_matches(asset, row, sources)
|
||||
quantities = dict.fromkeys(m.QUANTITIES)
|
||||
quantities['required_file_count'] = 1
|
||||
m.quantities_valid(quantities, row)
|
||||
subject = {'asset': asset, 'quantities': quantities, 'record_sha': m.semantic(row)}
|
||||
fit = self.proof('fit', subject)
|
||||
selected = {'isolated': m.proof_matches(fit, 'fit', subject)}
|
||||
unit = {kind: self.proof(kind, subject) for kind in ('mandatory_scope', 'disclosure')}
|
||||
self.assertTrue(m.technical_readiness(['isolated'], selected, unit, subject))
|
||||
# Never run check() against these fixtures or count them as real assets.
|
||||
bad = copy.deepcopy(fit)
|
||||
bad['subject']['asset']['sha256'] = 'b' * 64
|
||||
self.rejected(m.proof_matches, bad, 'fit', subject)
|
||||
bad_quantity = dict(quantities, required_file_count=2)
|
||||
self.rejected(m.quantities_valid, bad_quantity, row)
|
||||
bad_asset = dict(asset, sha256='b' * 64)
|
||||
self.rejected(m.asset_matches, bad_asset, row, sources)
|
||||
self.rejected(m.proof_matches, True, 'fit', subject)
|
||||
|
||||
def test_nonvacuous_and_unmade_denominator(self):
|
||||
self.rejected(m.technical_readiness, [], {}, {}, {})
|
||||
self.rejected(m.technical_readiness, ['made', 'unmade'], {'made': True}, {}, {})
|
||||
self.assertFalse(m.technical_readiness(['made', 'unmade'], {'made': True, 'unmade': False}, {}, {}))
|
||||
self.rejected(m.technical_readiness, ['x'], {'x': 'true'}, {}, {})
|
||||
|
||||
def test_format_layout_state_and_quantity(self):
|
||||
row, sources, asset = self.fixture()
|
||||
for bad in (dict(asset, format={'png_width': 17, 'png_height': 16}),
|
||||
dict(asset, region=[0, 0, 17, 16]),
|
||||
dict(asset, region=[True, 0, 16, 16]),
|
||||
dict(asset, kind='placeholder_media')):
|
||||
self.rejected(m.asset_matches, bad, row, sources)
|
||||
self.rejected(m.asset_matches, asset, {'group_id': 'state'}, sources)
|
||||
self.rejected(m.quantities_valid, dict.fromkeys(m.QUANTITIES, True), row)
|
||||
|
||||
def test_codec_and_strict_json(self):
|
||||
doc = {'keys': ['x'], 'strings': ['s'], 'pool': [], 'files': ['d', 0, 1]}
|
||||
self.assertEqual(m.decode(doc), {'x': 1})
|
||||
for files in (['s', True], ['s', -1], ['d', 0, 1, 0, 2],
|
||||
['unknown'], ['r', 0], float('nan'), float('inf')):
|
||||
self.rejected(m.decode, dict(doc, files=files))
|
||||
self.rejected(m.decode, dict(doc, pool=[['l', ['r', 0]]], files=['r', 0]))
|
||||
self.rejected(m.decode, dict(doc, pool=[['s', 0]], files=['r', 0]))
|
||||
for text in ('{"x":1,"x":2}', '{"x":NaN}', '{"x":Infinity}', '{"x":1e999}'):
|
||||
self.rejected(m.loads, text)
|
||||
|
||||
def test_path_escape(self):
|
||||
for path in ('../escape', '/tmp/escape', 'assets/../../escape'):
|
||||
self.rejected(m.safe_path, path)
|
||||
|
||||
def test_real_coverage_and_source_omission(self):
|
||||
for action in ('omit_identity', 'duplicate_identity', 'omit_source', 'duplicate_source'):
|
||||
d = copy.deepcopy(self.snapshot)
|
||||
if action == 'omit_identity':
|
||||
d['contracts'].pop()
|
||||
elif action == 'duplicate_identity':
|
||||
d['contracts'].append(d['contracts'][0])
|
||||
elif action == 'omit_source':
|
||||
d['candidate_pool'].pop(next(iter(d['candidate_pool'])))
|
||||
else:
|
||||
d['contracts'][0]['candidate_refs'].append(d['contracts'][0]['candidate_refs'][0])
|
||||
self.rejected(m.reference_contracts, d, self.records)
|
||||
|
||||
def test_real_source_missing_and_stale(self):
|
||||
path, digest = next(iter(self.ledger['source_pins'].items()))
|
||||
self.rejected(m.pinned, path, '0' * 64)
|
||||
self.rejected(m.pinned, m.OUT + 'nonexistent-proof.json', digest)
|
||||
|
||||
def test_real_png_crc_and_layout(self):
|
||||
path = 'assets/kenney/tiny_town/Tilemap/tilemap_packed.png'
|
||||
data = m.raw(path)
|
||||
fmt = m.png_format(data)
|
||||
self.assertEqual((fmt['png_width'], fmt['png_height']), (192, 176))
|
||||
damaged = bytearray(data)
|
||||
damaged[20] ^= 1
|
||||
self.rejected(m.png_format, bytes(damaged))
|
||||
sources = {path: {'sha256': m.sha(data), 'format': fmt}}
|
||||
asset = {'path': path, 'sha256': m.sha(data), 'format': fmt,
|
||||
'region': [191, 0, 16, 16], 'code_anchor': None, 'kind': 'image'}
|
||||
self.rejected(m.asset_matches, asset, {}, sources)
|
||||
|
||||
def test_real_reference_mismatch(self):
|
||||
a = copy.deepcopy(self.snapshot['contracts'][0]['source_anchors'][0])
|
||||
a['text'] += 'not the actual reference'
|
||||
self.rejected(m.anchor, a)
|
||||
|
||||
def test_real_license_bytes_and_rights_subject(self):
|
||||
pack = m.read(m.EVIDENCE + 'publisher-archive-byte-verification.json')['packs'][0]
|
||||
license_row = next(x for x in pack['members'] if x['archive_member'] == 'License.txt')
|
||||
path, digest = license_row['repo_path'], license_row['raw_sha256']
|
||||
original_raw = m.raw
|
||||
with mock.patch.object(m, 'raw', side_effect=lambda p: b'fake license' if p == path else original_raw(p)):
|
||||
self.rejected(m.pinned, path, digest)
|
||||
subject = {'source': next(iter(self.ledger['source_pins'])),
|
||||
'rights': {'creator': 'unknown', 'license': 'unknown'}}
|
||||
proof = self.proof('rights', subject)
|
||||
changed = copy.deepcopy(subject)
|
||||
changed['rights']['license'] = 'CC0'
|
||||
self.rejected(m.proof_matches, proof, 'rights', changed)
|
||||
|
||||
def test_real_false_finished_and_fake_booleans(self):
|
||||
c = self.snapshot['contracts'][0]
|
||||
row = self.records[c['id']][1]
|
||||
for value in (True, False, [], {'state': 'finished'}, 'selected'):
|
||||
self.rejected(m.selection_ready, c['id'], row, c, value, {})
|
||||
self.rejected(m.receipt, {'path': m.OUT + 'validation.json', 'sha256': '0' * 64, 'index': 0}, 'fit', {})
|
||||
self.rejected(m.receipt, True, 'fit', {})
|
||||
|
||||
def test_real_selected_contract_unknown_rights_and_forged_proof(self):
|
||||
c = self.snapshot['contracts'][0]
|
||||
row = self.records[c['id']][1]
|
||||
path = 'assets/kenney/tiny_town/Tilemap/tilemap_packed.png'
|
||||
data = m.raw(path)
|
||||
sources = {path: {'sha256': m.sha(data), 'format': m.png_format(data)}}
|
||||
product = 'scripts/ui/pixel_tower_art.gd'
|
||||
product_data = m.raw(product)
|
||||
ref = {'path': product, 'sha256': m.sha(product_data), 'line': 1,
|
||||
'text': product_data.decode().splitlines()[0]}
|
||||
rights_path = 'assets/kenney/tiny_town/License.txt'
|
||||
s = {'asset': {'path': path, 'sha256': m.sha(data), 'format': sources[path]['format'],
|
||||
'region': [0, 0, 16, 16], 'code_anchor': None, 'kind': 'image'},
|
||||
'creator': 'Fixture declaration, not a real attribution',
|
||||
'rights': {'license': 'unknown', 'origin': 'fixture only',
|
||||
'documents': [{'path': rights_path, 'sha256': m.sha(m.raw(rights_path))}]},
|
||||
'name': Path(path).name, 'replacement_chain': [c['id'], path], 'references': [ref],
|
||||
'quantities': dict.fromkeys(m.QUANTITIES), 'quantity_basis': 'Fixture, no final count',
|
||||
'usability': {'display': 'Requires actual exact-use display', 'hearing': 'Fixture image'}}
|
||||
choice = {'state': 'selected', 'contract': s, 'proofs': dict.fromkeys(m.PROOF_KINDS, True)}
|
||||
with self.assertRaisesRegex(ValueError, 'unknown license'):
|
||||
m.selection_ready(c['id'], row, c, choice, sources)
|
||||
s['rights']['license'] = 'CC0'
|
||||
with self.assertRaisesRegex(ValueError, 'proof reference schema'):
|
||||
m.selection_ready(c['id'], row, c, choice, sources)
|
||||
|
||||
def test_registered_cli_real_data_is_not_ready(self):
|
||||
argv = ['checker', '--verify-only', '--accepted-input', m.INPUT, '--require-ready']
|
||||
with mock.patch.object(sys, 'argv', argv), mock.patch('sys.stdout', new_callable=io.StringIO) as output:
|
||||
code = m.main()
|
||||
result = json.loads(output.getvalue())
|
||||
self.assertEqual(code, 2, result)
|
||||
self.assertTrue(result['record_integrity'])
|
||||
self.assertFalse(result['validation_ready'])
|
||||
self.assertEqual(result['pending_identity_count'], 614)
|
||||
self.assertFalse(result['acceptance_claimed'])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -3,15 +3,60 @@
|
||||
"formal_tests": "not_run; Runner owns execution",
|
||||
"original_unit_ready": false,
|
||||
"acceptance_claimed": false,
|
||||
"spec_comparison": "UTF8 decode.strip.encode SHA only for contract spec",
|
||||
"spec_comparison": "SHA256 of UTF-8 stdout.strip; raw file differs only by trailing newline",
|
||||
"spec_sha256": "f252de3c5cff7ebfa62322ae2f2df09fb80a44bc59eb286b76d4acb4c12ca875",
|
||||
"spec_raw_sha256": "c26c0b12cf7e7a7c46e671acde2e00762904732c1cd6381a53836e3d7b3f9824",
|
||||
"accepted_input_raw_sha256": "45fa52acf0c8bd4dd58c3b40b681cb92066f05d617df157fc18370a5e8816281",
|
||||
"ledger_bytes": 453678,
|
||||
"packet_bytes_before_this_validation_metadata": 472408,
|
||||
"ledger_bytes": 35441,
|
||||
"complete_packet_bytes": null,
|
||||
"complete_packet_verified_under_limit": false,
|
||||
"packet_measurement_blocker": "Required patch and packet evidence/proposal absent from this worktree; normal project reference access denied. 487283 is prospective, not measured.",
|
||||
"syntax_ast_parse": "passed; not formal validation",
|
||||
"complete_packet_limit": 500000,
|
||||
"runner_required": ["exact static validation", "meaningful negatives", "packet byte total", "applicable display and hearing", "independent Opus review", "integration and final original acceptance"],
|
||||
"expected_exit_codes": {"record_integrity_if_valid": 0, "require_ready_with_current_unmet_conditions": 2, "integrity_error": 1},
|
||||
"original_incomplete": ["614 exact uses lack completed selected usable assets; 495 candidates and 119 missing are not completion", "final per-use naming/resolution/frame/layout/replacement references", "creator and rights gaps including 20 media; internal BGM origin is not final approval", "mandatory unmade/disclosure gaps; D08/D09 content and quantities unknown", "applicable display/hearing evidence", "Root static validation and meaningful negatives", "independent Opus review", "integration and final original 30 packages/88 delivery units acceptance"]
|
||||
"runner_required": [
|
||||
"exact static validation",
|
||||
"meaningful negatives",
|
||||
"packet byte total",
|
||||
"applicable display and hearing",
|
||||
"independent Opus review",
|
||||
"integration and final original acceptance"
|
||||
],
|
||||
"expected_exit_codes": {
|
||||
"record_integrity_if_valid": 0,
|
||||
"require_ready_with_current_unmet_conditions": 2,
|
||||
"integrity_error": 1
|
||||
},
|
||||
"original_incomplete": [
|
||||
"614 exact uses lack completed selected usable assets; 495 candidates and 119 missing are not completion",
|
||||
"final per-use naming/resolution/frame/layout/replacement references",
|
||||
"creator and rights gaps including 20 media; internal BGM origin is not final approval",
|
||||
"mandatory unmade/disclosure gaps; D08/D09 content and quantities unknown",
|
||||
"applicable display/hearing evidence",
|
||||
"Root static validation and meaningful negatives",
|
||||
"independent Opus review",
|
||||
"integration and final original 30 packages/88 delivery units acceptance"
|
||||
],
|
||||
"local_bounded_checks": {
|
||||
"interpreter": "python3 -B (python unavailable)",
|
||||
"ast_parse": "passed: checker, build_contract.py, test_contract.py",
|
||||
"test_count": 13,
|
||||
"test_exit_code": 0,
|
||||
"ordinary_exit_code": 0,
|
||||
"require_ready_exit_code": 2,
|
||||
"formal_runner_execution": false
|
||||
},
|
||||
"checker_output": {
|
||||
"acceptance_claimed": false,
|
||||
"accepted_identity_count": 614,
|
||||
"candidate_source_count": 19,
|
||||
"original_completion": "not_claimed; requires formal validate, independent review, integration, final",
|
||||
"pending_identity_count": 614,
|
||||
"record_integrity": true,
|
||||
"selected_usable_count": 0,
|
||||
"unit_proofs_missing": [
|
||||
"disclosure",
|
||||
"mandatory_scope"
|
||||
],
|
||||
"validation_ready": false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user