-
Notifications
You must be signed in to change notification settings - Fork 1
Fix Golden Corpus Determinism test to hash validation output instead of pytest metadata #34
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
Conversation
🔍 Governance ClassificationChange Class: Description: Minor corrections with zero semantic impact (typos, formatting) Evidence Requirements
Review Requirements
Next Steps
📚 See GOVERNANCE.md for detailed requirements. |
Co-authored-by: hummbl-dev <238336761+hummbl-dev@users.noreply.github.com>
Co-authored-by: hummbl-dev <238336761+hummbl-dev@users.noreply.github.com>
|
@copilot The workflow is failing with a YAML syntax error on line 36. The multi-line Python script isn't properly formatted for YAML. The issue is that you can't have an unclosed quote spanning multiple lines like this: python -c "
import jsonPlease fix this by using a YAML heredoc instead. Replace the Python command sections with this approach: - name: Run corpus tests (iteration 1)
env:
BASE120_FIXED_TIMESTAMP: "2026-01-01T00:00:00.000000Z"
run: |
pytest tests/test_corpus.py --json-report --json-report-file=/tmp/corpus_run1.json
python << 'EOF'
import json
with open('/tmp/corpus_run1.json') as f:
data = json.load(f)
results = {
'summary': data['summary'],
'tests': [
{
'nodeid': t['nodeid'],
'outcome': t['outcome'],
'call': t.get('call', {}).get('longrepr', '') if t.get('call') else ''
}
for t in data['tests']
]
}
with open('/tmp/corpus_run1_clean.json', 'w') as f:
json.dump(results, f, sort_keys=True, indent=2)
EOF
echo "Run 1 completed"Apply the same fix to iterations 2 and 3, changing the file names accordingly (corpus_run2.json, corpus_run3.json, etc.). |
Co-authored-by: hummbl-dev <238336761+hummbl-dev@users.noreply.github.com>
Fixed in commit 3a83dbe. Replaced |
Co-authored-by: hummbl-dev <238336761+hummbl-dev@users.noreply.github.com>
Summary: Fix Golden Corpus Determinism Test ✅
This PR fixes the Golden Corpus Determinism test in
.github/workflows/governance-invariants.ymlwhich was failing on all active PRs because it was hashing pytest's complete output including non-deterministic timing metadata.Changes Completed
Technical Details
Problem: The workflow was hashing raw pytest stdout/stderr which included:
0.06svs0.05s) - non-deterministicAdditional Issue Fixed: YAML syntax error with multiline Python scripts using unclosed quotes (
python -c "...). Fixed by using bash heredoc syntax (python << 'EOF'...EOF).Solution:
pytest-json-reportto generate structured JSON outputVerification:
ec7841ee23732277ad2fee1d0ff8fc907060b5c960c6954450c95bf1a87f0ae4Impact
This fix will:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.