chore: housekeeping from the runs of 2026-10-09
Some checks failed
validation / verify (push) Failing after 12s
Some checks failed
validation / verify (push) Failing after 12s
- An Execution's files are written as each Deliverable is submitted, marked in_progress, so a killed process or one waiting for its user leaves them on disk. A write removes files an earlier write left that it no longer has. - A question about delivered work is answered from that Execution's solution guide by the reply writer; a question about the service is answered as before. Nothing is started for either. - Lessons: prove writes only for lessons the Skill holds; the Skill records the vendored Skill versions the lessons were read against, status names any that changed, and a test fails until they are reviewed. - Four more code patterns: Firestore, BigQuery, Eventarc and GKE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -498,16 +498,68 @@ def test_lessons_that_cost_quality_or_save_nothing_are_not_shown_to_help(tmp_pat
|
||||
assert "nothing fell" in render(compare(base, same), base, same)
|
||||
|
||||
|
||||
def test_the_comparison_is_written_into_published_proposals_only(tmp_path):
|
||||
def test_the_comparison_is_written_only_for_lessons_in_the_skill(tmp_path):
|
||||
from app.learning.proof import record
|
||||
|
||||
skill = lessons_skill(tmp_path)
|
||||
issues = tmp_path / "issues"
|
||||
live = publish(approve(proposal(issues), issues), skill, today=DAY)
|
||||
waiting = proposal(issues, title="Another", evidence_key="zzz")
|
||||
gone = publish(
|
||||
approve(proposal(issues, title="Retired", evidence_key="yyy"), issues),
|
||||
skill,
|
||||
today=DAY,
|
||||
)
|
||||
retire(gone.id, skill)
|
||||
|
||||
recorded = record([live, waiting], "| a table |")
|
||||
recorded = record([live, waiting, gone], "| a table |", published(skill))
|
||||
|
||||
assert [p.id for p in recorded] == ["L-01"]
|
||||
assert parse(live.path).proof == "| a table |"
|
||||
assert parse(waiting.path).proof == ""
|
||||
# A retired lesson was not part of what was compared.
|
||||
assert parse(gone.path).proof == ""
|
||||
|
||||
|
||||
# --- lessons are read again when the Skills beside them change ---------------------------
|
||||
|
||||
|
||||
def test_a_changed_upstream_skill_is_flagged_until_the_lessons_are_reviewed(tmp_path):
|
||||
from app.learning.skill import mark_reviewed, upstream_changes
|
||||
|
||||
skill = lessons_skill(tmp_path)
|
||||
issues = tmp_path / "issues"
|
||||
publish(approve(proposal(issues), issues), skill, today=DAY)
|
||||
then = {"architecture": "aaa", "security": "bbb"}
|
||||
mark_reviewed(skill, then)
|
||||
|
||||
assert upstream_changes(skill, then) == []
|
||||
now = {"architecture": "aaa", "security": "ccc", "cost": "ddd"}
|
||||
assert upstream_changes(skill, now) == ["cost", "security"]
|
||||
|
||||
mark_reviewed(skill, now)
|
||||
assert upstream_changes(skill, now) == []
|
||||
|
||||
|
||||
def test_nothing_is_flagged_with_no_lessons_or_nothing_recorded(tmp_path):
|
||||
from app.learning.skill import mark_reviewed, upstream_changes
|
||||
|
||||
skill = lessons_skill(tmp_path)
|
||||
assert upstream_changes(skill, {"architecture": "aaa"}) == []
|
||||
mark_reviewed(skill, {"architecture": "aaa"})
|
||||
# No lesson is published, so there is nothing to review.
|
||||
assert upstream_changes(skill, {"architecture": "zzz"}) == []
|
||||
|
||||
|
||||
def test_the_published_lessons_were_reviewed_against_todays_vendored_skills():
|
||||
"""Syncing the vendored Skills changes what the lessons sit beside. This fails
|
||||
until a person has read each lesson again and run `curate_lessons reviewed`."""
|
||||
from app.learning.skill import upstream_changes, upstream_reviewed
|
||||
from app.providers import load_provider
|
||||
from eval.curate_lessons import upstream_versions
|
||||
|
||||
bundle = load_provider("gcp")
|
||||
skill = bundle.skills[bundle.lessons_skill].path
|
||||
|
||||
assert upstream_reviewed(skill), "run: python -m eval.curate_lessons reviewed"
|
||||
assert upstream_changes(skill, upstream_versions(bundle)) == []
|
||||
|
||||
Reference in New Issue
Block a user