Repository navigation
docs: record executed organization transfers and remaining gates #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
879a292
docs: record executed organization transfers and remaining gates
HemSoft acb469e
ci: validate executed transfer evidence in inventory checks
HemSoft 2c89b7b
fix: bind transfer evidence and enforce the onboarding release contract
HemSoft 701cd38
fix: validate executed retention and pilot qualification evidence
HemSoft 347c3a1
fix: replay pilot fixtures and bind terminal evidence chronology
HemSoft 0df204d
test: bind transfer reports to complete primary evidence
HemSoft bce841c
test: validate executed App phase and historical protection limitation
HemSoft 69a6457
docs: distinguish historical rc21 proof from current canonical runtime
HemSoft 3e1d4d4
fix: bind transfer visibility and retrospective evidence paths
HemSoft f27ea51
fix: bind final manifest evidence and refresh validation primaries
HemSoft 05d6631
fix: bind downloaded coverage archive and exact installed version
HemSoft b1d7e63
fix: bind retained and pilot gate evidence to primary identities
HemSoft bce4b8b
fix: verify retained release signatures and terminal capture chronology
HemSoft f12ef52
fix: bind policy repairs refs and review comments to their captures
HemSoft bf70c88
fix: bind phase policy chronology and disclose historical evidence li…
HemSoft d8fb077
fix: verify full historical deployment and final provider captures
HemSoft 6c4d481
fix: derive historical pilot gates from authenticated check listings
HemSoft 0dc80ab
fix: refresh bound validation evidence and recheck current source gate
HemSoft 35c2c92
fix: compare retained validation result with current execution
HemSoft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| """Reject stale retained execution outputs after evidence-validator changes.""" | ||
| import ast | ||
| import argparse | ||
| import hashlib | ||
| import json | ||
| import pathlib | ||
| import re | ||
| import subprocess | ||
|
|
||
| ROOT = pathlib.Path(__file__).resolve().parents[2] | ||
| INPUTS = ('deployment/scripts/validate-executed-transfers.py', | ||
| 'deployment/tests/test_executed_transfers.py', | ||
| 'deployment/scripts/check-executed-validation-record.py') | ||
| parser = argparse.ArgumentParser(description=__doc__) | ||
| parser.add_argument('--record', type=pathlib.Path, default=ROOT / 'docs/organization-migration/execution/executed-transfer-validation.json') | ||
| record = json.loads(parser.parse_args().record.read_text()) | ||
| expected = {name: hashlib.sha256((ROOT / name).read_bytes()).hexdigest() for name in INPUTS} | ||
| if record.get('inputs_sha256') != expected: | ||
| raise ValueError('Retained validation output predates the current validator, corruption suite or record checker') | ||
| module = ast.parse((ROOT / INPUTS[1]).read_text()) | ||
| count = sum(isinstance(node, ast.FunctionDef) and node.name.startswith('test_') for node in ast.walk(module)) | ||
| tests = record['tests'] | ||
| if record['exit_code'] != 0 or tests['exit_code'] != 0 or tests['command'] != [ | ||
| 'python3', '-B', '-m', 'unittest', 'discover', '-s', 'deployment/tests', '-p', 'test_executed_transfers.py', '-v']: | ||
| raise ValueError('Retained corruption suite execution is not bound to its successful current command') | ||
| if not re.search(r'(?m)^Ran ' + str(count) + r' tests in [0-9.]+s$', tests['stderr']) or not tests['stderr'].rstrip().endswith('OK'): | ||
| raise ValueError('Retained corruption suite output does not match its current test count and result') | ||
| if record['command'] != ['python3', 'deployment/scripts/validate-executed-transfers.py', 'docs/organization-migration']: | ||
| raise ValueError('Retained validator execution is not bound to the actual command') | ||
|
HemSoft marked this conversation as resolved.
Resolved
|
||
| actual = subprocess.run(record['command'], cwd=ROOT, capture_output=True, text=True) | ||
| if actual.returncode != 0: | ||
| raise RuntimeError('Current validator recomputation failed: ' + actual.stderr) | ||
| if json.loads(actual.stdout) != record['result']: | ||
| raise ValueError('Retained validator result differs from the actual current validator output') | ||
| print('Retained executed-transfer validation record matches the current validator and ' + str(count) + ' corruption tests') | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.