Skip to content

About

Issue-driven build recipe maintenance for JuliaPackaging/Yggdrasil

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

YggdrasilFactory

YggdrasilFactory is an issue-driven build recipe cycler for JuliaPackaging/Yggdrasil, inspired by SciMLFactory.

A single concrete Python master (master.py) owns scheduling, state, risk classification, safe upstream SHA/tag verification, Buildkite polling, and GitHub writes. Fresh isolated sessions of any agent CLI (claude, codex, devin, opencode, gemini, or a custom command via YF_AGENT_CMD) perform triage, recipe edits, and review.

Quick start

Requires gh (authenticated with Yggdrasil + YggdrasilFactory write access), any supported agent CLI (claude, codex, devin, opencode, gemini, or custom YF_AGENT_CMD), Python 3.9+, and git. Durable state lives on the factory-state branch of JuliaPackaging/YggdrasilFactory (sanitized before every commit).

Paste this into any agent CLI to initialize and inspect status:

Clone (or cd into) JuliaPackaging/YggdrasilFactory, read GOAL.md, and follow its Startup instructions before taking any action.

Then start the cycler with your CLI's loop/goal command or a terminal:

  • Claude Code (/loop):
    /loop 5m Run python3 master.py tick and report any newly ready PRs or maintainer decisions
    
  • Goal-capable CLI (/goal):
    /goal Read GOAL.md and cycle python3 master.py tick on JuliaPackaging/YggdrasilFactory until stopped; run python3 master.py doctor first and report newly ready PRs or maintainer decisions.
    
  • Any terminal (continuous loop):
    gh repo clone JuliaPackaging/YggdrasilFactory && cd YggdrasilFactory
    python3 master.py run

See GOAL.md for the full agent operating rules, operator actions, and merge safety policy.

Master commands (python3 master.py)

python3 master.py doctor                # Verify GitHub permissions, state branch, and detected CLI/models
python3 master.py tick                  # Run one bounded scheduler step and print readable status
python3 master.py run                   # Run continuous scheduler ticks (default interval: 300s)
python3 master.py status                # Human-readable queue + clickable issue/PR URLs
python3 master.py plan --summary        # Bounded JSON summary
python3 master.py plan --issue 12345    # Detailed JSON state for one issue
python3 master.py review-policy         # Print reviewer levels and risk requirements
python3 master.py merge 12345 --dry-run # Check all merge gates on a ready PR
python3 master.py merge 12345           # Mark ready + squash-merge an eligible PR

How the deterministic cycle works

  1. Label-gated enrollment (factory: active / factory: inactive): On initialization, master.py records a UTC cutoff timestamp. All open issues created at or before the cutoff are backfilled as factory: inactive in batches of 25 (pass --include-closed-backfill to label closed historical issues too). New issues opened after the cutoff enroll automatically as factory: active. Maintainers can enroll or pause any issue at any time with labels or activate/pause.
  2. Triage (roles/triage.md): Maps the issue to one recipe A/Name–Z/Name, estimates difficulty (easy, medium, hard), and checks maintainer-only flags (security, provenance, license, shared, multi-recipe, registration) and critical recipes (OpenSSL, LLVM, CUDA, 0_RootFS/, etc.).
  3. Worker (roles/worker.md) + safe upstream helper (tools/upstream.py): Edits only build_tarballs.jl and bundled/ in an isolated workspace without shell execution. Git tag/commit pairs from upstream GitSource URLs are pre-fetched safely, and ArchiveSource/FileSource PENDING_SHA256_* placeholders are resolved deterministically over public HTTPS (with SSRF checks) before committing and opening a [PackageName] ... draft PR.
  4. Buildkite + Review (roles/reviewer.md): Waits for buildkite/yggdrasil and all per-triplet buildkite/yggdrasil/build-* statuses on the exact PR head, fetches bounded failure log tails for CHANGES fix passes, runs an independent fresh-session review, classifies the Yggdrasil risk criterion (YL1–YH8), and syncs ## Risk assessment onto the draft PR body.
  5. Decision & Merge:
    • Manual mode (default): Low- and medium-risk PRs with green Buildkite and a clean advisory review enter READY TO MERGE (review_tier: "advisory") for maintainer review and python3 master.py merge N. High-risk PRs always hold in NEEDS MAINTAINER DECISION.
    • Opt-in low-risk automerge (YF_MERGE_MODE=low-risk): Requires a qualifying counted reviewer (YF_COUNTED_REVIEW_MODEL at reviewer level ≥ 3 from a separate native session). Only low-risk PRs (YL1–YL3, non-critical, green Buildkite, satisfied counted review, no CHANGES_REQUESTED) auto-merge via exact-SHA squash merge.

Operator actions

python3 master.py activate 12345 --reason 'Confirmed target version v1.2.3'
python3 master.py pause 12345 --reason 'Waiting for upstream JLL registration'
python3 master.py link-follow-up 12345 --follow-up 12346 --reason 'Tracks deferred Windows target'
python3 master.py published 12345 --reason 'Verified JLL tag and General registration'

Configuration

Variable Default Purpose
YF_HARNESS auto Agent CLI (auto, claude, codex, devin, opencode, gemini, custom)
YF_MODEL CLI default (swe-2-1-high on Devin) Default model passed to worker/triage/advisory reviewer
YF_AGENT_CMD unset Custom headless CLI template when YF_HARNESS=custom (supports {role}, {model}, {workspace}, {recipe})
YF_FACTORY_REPO JuliaPackaging/YggdrasilFactory Repository holding the factory-state branch
YF_REQUIRE_PRIVATE_STATE 0 Set 1 to enforce a private state repository
YF_PUSH_REPO JuliaPackaging/Yggdrasil Target or fork (owner/Yggdrasil) for factory branches
YF_MERGE_MODE manual manual (default) or low-risk (requires YF_COUNTED_REVIEW_MODEL)
YF_STRONG_MODEL unset Optional escalation model (Devin falls back to swe-2-1-xhigh if available)
YF_COUNTED_REVIEW_MODEL unset Level 3–5 UID from YF_REVIEW_MODELS_FILE for counted reviews / automerge
YF_REVIEW_MODELS_FILE unset Local JSON registry scoring external counted-review models
YF_DAILY_CALLS 10 Daily agent CLI invocation cap (UTC)
YF_INTERVAL 300 Seconds between scheduler ticks in run mode

Policy and historical calibration · Operations and recovery

About

Issue-driven build recipe maintenance for JuliaPackaging/Yggdrasil

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages