P23-03: 生活の観察
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
|||||||
|
# Repair37 portable recorded negative fixture
|
||||||
|
|
||||||
|
Candidate starts at `059c2f743be655c11627a2b19d8eab9f86a000a6` under the unchanged P23-03 contract. No Git write or Runner operation was performed.
|
||||||
|
|
||||||
|
`tests/fixtures/p23-03/recorded-badge-negative.json.gz` is copied byte-for-byte from Root's `.runtime/P23-03/build/audit-support/badge-repair37-portable-fixture/PROPOSED_PORTABLE_FIXTURE.json.gz` in the parent worktree directory. SHA256: `17b1596fb1dca0436cd656ac21a9dc754c75b4485335a0aebe533f70e1c1b5ac`; gzip length 83,518 bytes; decompressed length 3,490,211 bytes. Repeated decompression yields identical bytes.
|
||||||
|
|
||||||
|
The bundle records observed source `26f60095bff015efbf7d7cf89b5b0bbab1fec31e`, observed tested commit `dfe0dc44b0b88ace598c1b8bd05283c6084cb081`, and original PID 87103. These are preserved negative-input provenance, not acceptance evidence for 059 or this candidate. Original relative paths below are relative to the preserved `p23-normal-os-26f-r17` evidence root:
|
||||||
|
|
||||||
|
| Payload | Original relative path | Bytes | SHA256 |
|
||||||
|
| --- | --- | ---: | --- |
|
||||||
|
| request | `os-pair/B/writer-request-0021/request.json` | 655285 | `f9cd2d5ff9dd63d9cf7ae4a295ccef8eea16f75ac784696dc40906703731e1d8` |
|
||||||
|
| state | `os-pair/B/writer-stream/objects/724d8fe362ba3e05eddd83c4b7c54da101899df6cd91ae88250feea3d4feff82.json` | 1867011 | `724d8fe362ba3e05eddd83c4b7c54da101899df6cd91ae88250feea3d4feff82` |
|
||||||
|
| manifest | `os-pair/B/writer-request-0021/review-image-0/manifest.json` | 75726 | `a98782ec1263aba400d542862dd084d2f1dd4cf7a0851cf7f0679867e545a338` |
|
||||||
|
|
||||||
|
The loader verifies all three payload lengths and hashes on every call. Request uses JSON, report and state use the existing typed decoder; state retains the whole-Dictionary check. There is no runtime lookup, fallback, cache, extraction, or skip.
|
||||||
|
|
||||||
|
Local validation: all 146 Python tests pass; AST audit against 059c2f7 confirms 145 test methods are source-byte and AST identical, and the remaining method is AST identical after replacing only the manifest assignment value with the same fixed placeholder. Python syntax compilation passes. A fresh isolated copy of Git-tracked candidate files plus the fixture, without `.runtime`, passes Repair36LabelTests 4/4. Separate corrupt-payload and missing-fixture controls fail with fatal errors. No extra fixture is retained.
|
||||||
|
|
||||||
|
Frozen whole-file SHA256 values remain unchanged: renderer `4bc49a19a38b9c3b4d6bfc243ddf46f1f25469a8273adb5e812911ef9424a1f2`; checker `e41479ae51bccdfab3f31bd348794b441c2f341179bbe33222e2aacdf88f987f`.
|
||||||
|
|
||||||
|
Native and OS checks are still pending. Root's final local run on the new tested commit, raw geometry/native checks, new normal OS run, every indexed-image review, mandatory full 179, formal all 7, integration and ledger remain pending. No Godot or full suite was run by this worker.
|
||||||
Binary file not shown.
@@ -8,6 +8,7 @@ import contextlib
|
|||||||
import io
|
import io
|
||||||
import json
|
import json
|
||||||
import hashlib
|
import hashlib
|
||||||
|
import gzip
|
||||||
import struct
|
import struct
|
||||||
import zlib
|
import zlib
|
||||||
import tempfile
|
import tempfile
|
||||||
@@ -2294,14 +2295,29 @@ class FrameReviewTests(unittest.TestCase):
|
|||||||
|
|
||||||
|
|
||||||
class Repair36LabelTests(unittest.TestCase):
|
class Repair36LabelTests(unittest.TestCase):
|
||||||
inputs = check.ROOT.parent / '.runtime/P23-03/build/audit-support/badge-repair36-exact-inputs'
|
inputs = check.ROOT / 'tests/fixtures/p23-03/recorded-badge-negative.json.gz'
|
||||||
|
|
||||||
|
def _recorded_payloads(self):
|
||||||
|
bundle = json.loads(gzip.decompress(self.inputs.read_bytes()))
|
||||||
|
expected = {
|
||||||
|
'request': (655285, 'f9cd2d5ff9dd63d9cf7ae4a295ccef8eea16f75ac784696dc40906703731e1d8'),
|
||||||
|
'state': (1867011, '724d8fe362ba3e05eddd83c4b7c54da101899df6cd91ae88250feea3d4feff82'),
|
||||||
|
'manifest': (75726, 'a98782ec1263aba400d542862dd084d2f1dd4cf7a0851cf7f0679867e545a338'),
|
||||||
|
}
|
||||||
|
payloads = {}
|
||||||
|
for name, (length, digest) in expected.items():
|
||||||
|
payload = bundle['files'][name]['raw_utf8'].encode('utf-8')
|
||||||
|
check.require(len(payload) == length and hashlib.sha256(payload).hexdigest() == digest,
|
||||||
|
'recorded fixture payload mismatch: ' + name)
|
||||||
|
payloads[name] = payload
|
||||||
|
return payloads
|
||||||
|
|
||||||
def recorded(self):
|
def recorded(self):
|
||||||
request = json.loads((self.inputs/'bad-native-request/request.json').read_bytes())
|
payloads = self._recorded_payloads()
|
||||||
stream = self.inputs.parent.parent/'p23-normal-os-26f-r17/os-pair/B/writer-stream'
|
request = json.loads(payloads['request'])
|
||||||
capture = next(json.loads(line) for line in (stream/'manifest.jsonl').read_text().splitlines()
|
typed_state = json.loads(payloads['state'])
|
||||||
if json.loads(line).get('label') == 'writer-request-0021')
|
check.require(typed_state.get('type') == 'Dictionary', 'whole dictionary required')
|
||||||
return request, check.read_object(stream, capture['state']), check.decode(request['report'])
|
return request, check.decode(typed_state), check.decode(request['report'])
|
||||||
|
|
||||||
def resolved(self, report):
|
def resolved(self, report):
|
||||||
result = copy.deepcopy(report)
|
result = copy.deepcopy(report)
|
||||||
@@ -2321,7 +2337,7 @@ class Repair36LabelTests(unittest.TestCase):
|
|||||||
check.compare_badges(state, report)
|
check.compare_badges(state, report)
|
||||||
check.compare_actor_geometry(state, report)
|
check.compare_actor_geometry(state, report)
|
||||||
queue = next(b for b in report['landing_badges'] if b['visible_count'] == 0)
|
queue = next(b for b in report['landing_badges'] if b['visible_count'] == 0)
|
||||||
manifest = json.loads((self.inputs/'bad-native-request/review-image-0/manifest.json').read_bytes())
|
manifest = json.loads(self._recorded_payloads()['manifest'])
|
||||||
original = manifest['rows'][5]
|
original = manifest['rows'][5]
|
||||||
self.assertEqual(queue['anchor'], original['local_rect'][:2])
|
self.assertEqual(queue['anchor'], original['local_rect'][:2])
|
||||||
self.assertEqual(original['screenshot_rect'][:2], [642,469])
|
self.assertEqual(original['screenshot_rect'][:2], [642,469])
|
||||||
|
|||||||
Reference in New Issue
Block a user