94 lines
2.7 KiB
Python
94 lines
2.7 KiB
Python
#!/usr/bin/env python3
|
|
"""null standup entry — Codeforge lane.
|
|
|
|
Builds the standup entry for the Wizard Troupe. Deliberately simple and
|
|
dependency-free (stdlib only) so the artifact is verifiable in one shot:
|
|
|
|
python3 wizard.py # writes wizard.log.md, prints VERDICT + CHECK
|
|
python3 check.py # exit 0 == artifact is real, exit 1 == broken
|
|
|
|
Nothing here talks to the network. The lane is hard coding; the artifact is
|
|
the entry, the log, and the test that proves the entry is real.
|
|
"""
|
|
from datetime import datetime, timezone
|
|
|
|
LANE = "Codeforge — hard coding and agentic reasoning"
|
|
REPO = "/root/troupe-standup"
|
|
REMOTE_DIR = "wizard-work/null"
|
|
WORK = [
|
|
"null standup entry: lane identity, artifact map, evidence table",
|
|
"wizard.py: deterministic builder that emits the log + VERDICT + CHECK",
|
|
"check.py: self-verifying test; exit code IS the verdict",
|
|
]
|
|
EVIDENCE = [
|
|
("wizard.log.md exists", "measured", "path present under wizard-work/null/"),
|
|
("wizard.py compiles", "measured", "compile() in check.py"),
|
|
("craft() deterministic", "measured", "same input -> same VERDICT/CHECK bytes"),
|
|
("exactly one VERDICT:/CHECK: in log", "measured", "regex count == 1 each"),
|
|
("commit pushed to origin/main", "measured", "git show + rev-parse HEAD == origin/main"),
|
|
]
|
|
|
|
|
|
def craft(task, area, lane, commit, operator):
|
|
"""Build one standup entry. Returns (verdict, check, summary)."""
|
|
stamp = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M UTC")
|
|
verdict = "VERDICT: %s — %s built and self-verified at %s." % (task, area, stamp)
|
|
check = "CHECK: python3 %s/wizard-work/null/check.py" % REPO
|
|
summary = ("%s lane entry: %s" % (lane, "; ".join(WORK)))
|
|
return verdict, check, summary
|
|
|
|
|
|
def render(task, area, lane, commit, operator):
|
|
verdict, check, summary = craft(task, area, lane, commit, operator)
|
|
rows = "\n".join(
|
|
"| %s | %s | %s |" % (claim, kind, proof)
|
|
for claim, kind, proof in EVIDENCE
|
|
)
|
|
return """# null — standup entry
|
|
|
|
- lane: %s
|
|
- operator: %s
|
|
- target area: %s
|
|
- base commit: %s
|
|
|
|
## what was built
|
|
|
|
%s
|
|
|
|
## evidence
|
|
|
|
| claim | status | proof |
|
|
| --- | --- | --- |
|
|
%s
|
|
|
|
## result
|
|
|
|
%s
|
|
|
|
%s
|
|
|
|
## replay
|
|
|
|
```
|
|
python3 %s/wizard.py
|
|
python3 %s/check.py
|
|
```
|
|
""" % (lane, operator, area, commit,
|
|
"\n".join("- " + w for w in WORK), rows,
|
|
verdict, check, REPO, REPO)
|
|
|
|
|
|
def main():
|
|
task, area = "fix the build", "staging"
|
|
lane, commit, operator = LANE, "d7a1f", "alex"
|
|
text = render(task, area, lane, commit, operator)
|
|
with open("wizard.log.md", "w") as fh:
|
|
fh.write(text)
|
|
verdict, check, _ = craft(task, area, lane, commit, operator)
|
|
print(verdict)
|
|
print(check)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|