-
Notifications
You must be signed in to change notification settings - Fork 0
fix(ahbg): implement war_v3 resolver, canonical UCNS/corpus, truthful artifacts #15
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
8e12e32
fix(ahbg): implement war_v3 resolver, canonical UCNS/corpus, truthful…
erinepshovel-code 7e57011
ci(ahbg): add grok gate workflow; record war_v3 freeze divergence
erinepshovel-code 5c6be8e
fix(ahbg): remove unrelated mutable burden aggregate from war repair
erinepshovel-code 7862b4c
fix(ahbg): remove unrelated burden aggregate artifact
erinepshovel-code 031e25c
fix(ahbg): remove unrelated burden aggregate report
erinepshovel-code 6038d2b
fix(ahbg): keep targeted defenders on contested tiles
erinepshovel-code 68a9c9c
fix(ahbg): validate war evidence during replay
erinepshovel-code e0d7217
tests(ahbg): cover moving defender and war replay validation
erinepshovel-code caeb01d
ci(ahbg): fail closed on corpus standings and use current Actions
erinepshovel-code 475fb87
docs(ahbg): align corpus proposal with war_v3 successor
erinepshovel-code 949198c
ci(ahbg): add one-shot corpus regeneration repair
erinepshovel-code 68a1ee9
fix(ahbg): bind corpus to canonical UCNS and exact run identity
github-actions[bot] 08730a0
ci(ahbg): repair one-shot regeneration verification
erinepshovel-code 72e7c69
ci(ahbg): isolate one-shot regeneration failure boundary
erinepshovel-code 72dd17a
fix(ahbg): repair corpus runner regeneration syntax
github-actions[bot] 704aecb
ci(ahbg): isolate failing Grok suite before final regeneration
erinepshovel-code f226fba
tests(ahbg): pin corrected successor corpus identity
erinepshovel-code 6e954eb
ci(ahbg): rerun evidence regeneration after corpus identity test repair
erinepshovel-code 2f13ee0
chore(ahbg): regenerate evidence from committed war_v3 source
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| name: ahbg-corpus-regenerate-once | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - fix/ahbg-war-v3-canonical | ||
| paths: | ||
| - .github/workflows/ahbg-corpus-regenerate.yml | ||
| - ahbg/grok/tests/test_common_corpus.py | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| regenerate: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: "3.12" | ||
|
|
||
| - name: Verify corpus identity and runner syntax | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| python - <<'PY' | ||
| import hashlib | ||
| import json | ||
| from pathlib import Path | ||
| path = Path("ahbg/deepseek/corpus-proposal/corpus.json") | ||
| raw = path.read_bytes() | ||
| corpus = json.loads(raw) | ||
| authority = corpus.get("board", {}).get("authority") | ||
| expected = "UCNS mobius_seed band centers (libs/ucns/src/ucns/mobius_seed.py)" | ||
| assert authority == expected, (authority, expected) | ||
| digest = hashlib.sha256(raw).hexdigest() | ||
| sidecar = Path("ahbg/deepseek/corpus-proposal/CORPUS.sha256").read_text().strip() | ||
| assert digest == sidecar, (digest, sidecar) | ||
| runner = Path("ahbg/grok/run_common_corpus.py").read_text() | ||
| assert f'CORPUS_FILE_SHA256 = "{digest}"' in runner | ||
| print(f"corpus_sha256={digest}") | ||
| PY | ||
| python -m py_compile ahbg/grok/run_common_corpus.py | ||
|
|
||
| - name: Grok a0 tests | ||
| working-directory: ahbg/grok | ||
| run: python -m unittest discover -s a0/tests -p 'test*.py' | ||
|
|
||
| - name: Grok AHBG field tests | ||
| working-directory: ahbg/grok | ||
| run: python -m unittest discover -s ahbg/tests -p 'test*.py' | ||
|
|
||
| - name: Grok common-corpus tests | ||
| working-directory: ahbg/grok | ||
| run: python -m unittest discover -s tests -p 'test*.py' | ||
|
|
||
| - name: Regenerate committed evidence | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| cd ahbg/grok | ||
| python run.py | ||
| python run_common_corpus.py | ||
| python - <<'PY' | ||
| import json | ||
| from pathlib import Path | ||
| result = json.loads(Path("corpus-run/calibration-family-1.0.1-proposal-1/CALIBRATION_RESULT.json").read_text(encoding="utf-8")) | ||
| expected = {"survived": 35, "falsified": 0, "unresolved": 0, "blocked": 0} | ||
| assert result.get("summary") == expected, result.get("summary") | ||
| assert len(result.get("results", [])) == 35 | ||
| assert all(row.get("replay_equal") is True for row in result["results"]) | ||
| PY | ||
| cd ../.. | ||
| git add ahbg/grok/CALIBRATION_RESULT.json \ | ||
| ahbg/grok/EVENTS.jsonl \ | ||
| ahbg/grok/artifacts \ | ||
| ahbg/grok/corpus-run/calibration-family-1.0.1-proposal-1 | ||
| if ! git diff --cached --quiet; then | ||
| git commit -m "chore(ahbg): regenerate evidence from committed war_v3 source" | ||
| git push origin HEAD:fix/ahbg-war-v3-canonical | ||
| fi |
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,69 @@ | ||
| name: ahbg | ||
|
|
||
| on: | ||
| push: | ||
| paths: | ||
| - "ahbg/**" | ||
| - "libs/ucns/**" | ||
| - ".github/workflows/ahbg.yml" | ||
| pull_request: | ||
| paths: | ||
| - "ahbg/**" | ||
| - "libs/ucns/**" | ||
| - ".github/workflows/ahbg.yml" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| grok-gates: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: "3.12" | ||
|
|
||
| - name: Grok a0 tests | ||
| working-directory: ahbg/grok | ||
| run: python -m unittest discover -s a0/tests -p 'test*.py' | ||
|
|
||
| - name: Grok ahbg tests | ||
| working-directory: ahbg/grok | ||
| run: python -m unittest discover -s ahbg/tests -p 'test*.py' | ||
|
|
||
| - name: Grok common-corpus tests | ||
| working-directory: ahbg/grok | ||
| run: python -m unittest discover -s tests -p 'test*.py' | ||
|
|
||
| - name: Grok smoke epoch run | ||
| working-directory: ahbg/grok | ||
| run: python run.py | ||
|
|
||
| - name: Grok common corpus run (35 scenarios, temp output) | ||
| working-directory: ahbg/grok | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| python run_common_corpus.py --output /tmp/ahbg-grok-corpus-run | ||
| python - <<'PY' | ||
| import json | ||
| from pathlib import Path | ||
|
|
||
| result = json.loads( | ||
| Path("/tmp/ahbg-grok-corpus-run/CALIBRATION_RESULT.json").read_text(encoding="utf-8") | ||
| ) | ||
| summary = result.get("summary", {}) | ||
| expected = { | ||
| "survived": 35, | ||
| "falsified": 0, | ||
| "unresolved": 0, | ||
| "blocked": 0, | ||
| } | ||
| if summary != expected or len(result.get("results", [])) != 35: | ||
| raise SystemExit( | ||
| f"common corpus is not clean: summary={summary!r}, results={len(result.get('results', []))}" | ||
| ) | ||
| if not all(row.get("replay_equal") is True for row in result["results"]): | ||
| raise SystemExit("common corpus contains a non-replay-equal scenario") | ||
| PY | ||
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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| 07034b01f9311b0a82a498a91742c588e27494e8e0d729974432608bfa8c0891 | ||
| bc521113ffa7bd6d5094c71f3ad66547d5f00260f380258e43c2086533a5d7ed |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a corpus scenario hits either caught
ValueErrorpath,run_scenarioincrementsinvalid_actionsand may stop before completing its turns, but still reportsevidence_standing: SURVIVEDwhenever the partial field replays. I reproduced this with an invalid forced destination and obtainedinvalid_actions=1,final_turn=0,replay_equal=true, andSURVIVED; consequently this summary/replay-only check—and the equivalent regeneration check—stays green and can commit incomplete evidence after an engine regression. Fresh evidence beyond the earlier gate comment is that even the newly added clean-summary assertion does not inspectinvalid_actionsor verifyfinal_turn == turns.Useful? React with 👍 / 👎.