Pin P24 old-slot preservation and exact restored snapshot evidence
This commit is contained in:
@@ -89,6 +89,29 @@ def runtime_context(git, repo, revision):
|
||||
return context, proof
|
||||
|
||||
|
||||
def unchanged_dependency_context(repo, revision):
|
||||
selected = {
|
||||
'scripts/relationship/relationship_state.gd': None,
|
||||
'scripts/staff/staff_service.gd': ['remove_staff', 'retire_staff'],
|
||||
'scripts/guest/guest_service.gd': ['despawn_guest'],
|
||||
}
|
||||
result = {}
|
||||
for path, names in selected.items():
|
||||
full = source(repo, revision, path)
|
||||
assert full == source(repo, BASE, path), 'relationship dependency changed; review complete delta first'
|
||||
entry = {'path': path, 'revision': revision, 'whole_source_sha256': sha(full),
|
||||
'unchanged_from_base': True, 'whole_file_included': names is None}
|
||||
if names is None:
|
||||
entry['source'] = full
|
||||
else:
|
||||
lines, _, methods = method_ranges(full)
|
||||
assert all(name in methods for name in names), 'required dependency method absent'
|
||||
entry['complete_methods'] = {name: ''.join(lines[methods[name][0]:methods[name][1]]) for name in names}
|
||||
entry['omitted_scope'] = 'Other unchanged methods; not entire service review'
|
||||
result[path] = entry
|
||||
return result
|
||||
|
||||
|
||||
def packet(runner, task_id, revision, original_packet):
|
||||
from runner.core import git, allowed, secret_path, read_json, CONTROL, require
|
||||
task = runner.task(task_id)
|
||||
@@ -120,6 +143,7 @@ def packet(runner, task_id, revision, original_packet):
|
||||
body['sources'][MARKERS] = json.dumps(reduced, ensure_ascii=False, indent=2)
|
||||
body['immutable_identity_catalog'] = {p: source(runner.repo, revision, p)
|
||||
for p in ['data/characters/mvp_unique_characters.json']}
|
||||
body['immutable_relationship_dependencies'] = unchanged_dependency_context(runner.repo, revision)
|
||||
body['tests'] = [read_json(row[0]) for row in runner.db.execute(
|
||||
"SELECT artifact FROM evidence WHERE task_id=? AND kind='validation' AND commit_sha=? AND passed=1",
|
||||
(task_id, revision))]
|
||||
|
||||
Reference in New Issue
Block a user