Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
ab3ca81
test: prepare isolated integration harness for CI smoke
Santiagocetran Oct 2, 2026
2af68f3
test: preserve validated public demo accounts during isolated bootstrap
Santiagocetran Oct 2, 2026
03bf1c7
refactor(task-auditor): DINTaskAuditor size review (#201 Part A item 4)
umermjd11 Oct 6, 2026
c4c2b1c
fix(task-auditor): one address can't hold both roles in a GI (#180)
umermjd11 Oct 6, 2026
1c65b38
fix(dincli): reject manifest paths that escape their base directory (…
Abidoyesimze Oct 6, 2026
53d4960
Merge branch 'develop' into fix/issue-227-manifest-path-traversal
Abidoyesimze Oct 6, 2026
5022604
fix(task-auditor): restore _burnAndForward NatSpec, refresh refs (PR …
umermjd11 Oct 7, 2026
e66d7bc
merge: PR No. 235 (umermjd11/feat/task-061026-20-auditor-size-dual-ro…
umermjd11 Oct 7, 2026
7eb558d
merge: PR No. 213 (Santiagocetran/ci/smoke-harness-foundation) into d…
Santiagocetran Oct 8, 2026
0be3d4a
merge: PR No. 237 (Abidoyesimze/fix/issue-227-manifest-path-traversal…
Abidoyesimze Oct 8, 2026
920c93e
fix(dincli): require role-scoped base_dir in ensure_file_exists/load_…
umeradl Oct 8, 2026
6e361cb
docs(tasks): tick task_061026_22 deliverables (Discussion No. 233 clo…
umeradl Oct 8, 2026
d664bb4
docs: document per-participant reward rounding dust as accepted (#250)
Abidoyesimze Oct 15, 2026
cd35dff
fix(dincli): make submit-genesis-model safe to re-run (issue #251)
Abidoyesimze Oct 15, 2026
19ea500
merge: PR No. 256 (Abidoyesimze/docs/issue-250-reward-rounding-dust) …
Abidoyesimze Oct 15, 2026
23e1eb7
fix(skills): din-push-develop watcher no longer reports a running CI …
umeradl Oct 15, 2026
583e45e
docs: add partner outreach checklist
Santiagocetran Oct 16, 2026
4dc4210
docs(contracts): document one-shot dispute resolution rule and add re…
robertocarlous Oct 17, 2026
06ce394
merge: PR No. 257 (Abidoyesimze/fix/issue-251-genesis-score-safe-reru…
Abidoyesimze Oct 18, 2026
a09e0d8
fix(dincli): submit-genesis-model score-only re-run exits early when …
umeradl Oct 18, 2026
757ef61
merge: PR No. 262 (Santiagocetran/docs/issue-239-partner-outreach) in…
Santiagocetran Oct 19, 2026
5f610c7
docs: widen partner-checklist slashing wording to cover consensus/dev…
umeradl Oct 19, 2026
d7ec370
docs: add CODEOWNERS and Developer/MAINTAINING.md (Discussion 208, S2)
umermjd11 Oct 21, 2026
04963c9
docs(MAINTAINING): final approval after reviewer fixes excludes all f…
umermjd11 Oct 21, 2026
20a52a9
docs(MAINTAINING): Abraham's recorded sign-off covers Umer's own mech…
umermjd11 Oct 21, 2026
cfbfacc
fix(dincli): omit transaction links when explorer is absent
Santiagocetran Oct 21, 2026
0f1b97b
Merge pull request #268 from umermjd11/docs/maintaining-codeowners
Santiagocetran Oct 21, 2026
c055dba
Merge branch 'develop' into fix/265-local-transaction-info
Santiagocetran Oct 21, 2026
eb8085d
Merge pull request #269 from Santiagocetran/fix/265-local-transaction…
robertocarlous Oct 21, 2026
cfda0e1
chore(skills): generalise the din-* skills for any maintainer (Discus…
umermjd11 Oct 21, 2026
718f06b
feat(stake): cross-model S5 escalation (#193)
umermjd11 Oct 6, 2026
631963c
fix(skills): peer check covers merged-PR co-authors; path B is Umer o…
umermjd11 Oct 23, 2026
301abda
fix(stake): keep DinValidatorStake __gap at 50; refresh line refs (PR…
umermjd11 Oct 23, 2026
3d356b2
style(deploy): space before = in DEFAULT_S5_GLOBAL_THRESHOLD (PR 236 …
umermjd11 Oct 23, 2026
d63ed98
fix(stake): S5 escalation epoch so no miss counts toward two escalations
umermjd11 Oct 23, 2026
594a98a
feat(task-coordinator): richer GI states — AuditSeedLocked, AuditTest…
umermjd11 Oct 24, 2026
e88675b
Merge pull request #271 from umermjd11/chore/generalise-din-skills
robertocarlous Oct 24, 2026
d8dbd1f
Merge branch 'develop' into feat/task-061026-21-gi-states
Abidoyesimze Oct 24, 2026
37fe212
Merge branch 'develop' into feat/issue-248-one-shot-dispute-docs
Abidoyesimze Oct 24, 2026
ade45a6
fix(docs): correct squatting-window and re-dispute-fix wording (revie…
robertocarlous Oct 24, 2026
c1dba19
Merge pull request #272 from umermjd11/feat/task-061026-21-gi-states
robertocarlous Oct 24, 2026
496c666
Merge branch 'develop' into feat/issue-248-one-shot-dispute-docs
robertocarlous Oct 24, 2026
7b8afe0
Merge pull request #264 from robertocarlous/feat/issue-248-one-shot-d…
Abidoyesimze Oct 24, 2026
1f4d1fd
Merge branch 'develop' into feat/task-061026-20-cross-model-s5
abrahamnash Oct 25, 2026
55c4b52
Merge pull request #236 from umermjd11/feat/task-061026-20-cross-mode…
abrahamnash Oct 25, 2026
5627666
docs(indexer): add platform-contract event coverage audit (P4-IDX1)
robertocarlous Jul 10, 2026
150e35c
feat(indexer): add GraphQL entity schema for platform-contract subgra…
robertocarlous Jul 10, 2026
f464d77
feat(indexer): add subgraph.yaml manifest and contract ABIs (P4-IDX1)
robertocarlous Jul 11, 2026
539ca66
docs(indexer): add daemon event schema for dind P4-7.1 (P4-IDX1)
robertocarlous Jul 11, 2026
cf934d3
feat(indexer): add AssemblyScript mapping handlers for all platform c…
robertocarlous Jul 12, 2026
b47ff92
feat(indexer): add local Graph node docker-compose stack (P4-IDX2)
robertocarlous Jul 12, 2026
39433d6
feat(indexer): replace dindao RPC loops with GraphQL queries (P4-IDX3)
robertocarlous Jul 12, 2026
9ca158d
docs(indexer): add GraphQL integration handoff notes (P4-IDX3)
robertocarlous Jul 12, 2026
097450d
docs(indexer): add example GraphQL queries for validator, model, and …
robertocarlous Jul 12, 2026
54bb108
docs(indexer): doc-correction pass on indexer.md — resolve open quest…
robertocarlous Jul 12, 2026
c1c8537
docs(indexer): add task-contract event audit for DINTaskCoordinator a…
robertocarlous Jul 13, 2026
9474146
feat(indexer): add GlobalIteration, AggregatorRegistration, AuditorRe…
robertocarlous Jul 13, 2026
06ed32c
feat(indexer): add Tier1Batch, Tier2Batch, AuditBatch entities
robertocarlous Jul 13, 2026
1c805d5
feat(indexer): add LocalModelSubmission, T1/T2AggregationSubmission, …
robertocarlous Jul 13, 2026
7262549
feat(indexer): add AggregatorSlashEvent, AuditorSlashEvent, PassScore…
robertocarlous Jul 13, 2026
6c61218
feat(indexer): add DINTaskCoordinator and DINTaskAuditor dynamic data…
robertocarlous Jul 13, 2026
77001ce
feat(indexer): wire ModelApproved handler to instantiate task contrac…
robertocarlous Jul 13, 2026
79de4bd
feat(indexer): add AssemblyScript handlers for DINTaskCoordinator and…
robertocarlous Jul 13, 2026
cc4ad43
chore(indexer): document 1000-result GraphQL cap; add update-subgraph…
robertocarlous Aug 4, 2026
461ea72
feat(indexer): wire P3-staking events into subgraph (#65)
robertocarlous Aug 4, 2026
d32d353
fix(tests): update test_list_pending_requests for dindao→dinrep renam…
robertocarlous Oct 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .claude/scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Shared scripts for the `din-*` skills

The `din-*` Claude Code skills under [`../skills/`](../skills/) implement the maintainer workflow in [`Developer/MAINTAINING.md`](../../Developer/MAINTAINING.md). Any maintainer can run them. These scripts hold the parts that every skill shares.

| File | What it does |
|---|---|
| [`din_peer_check.py`](din_peer_check.py) | The peer-rule check ([MAINTAINING No. 1](../../Developer/MAINTAINING.md#1-the-rule)). It refuses when the active `gh` user is the author, assignee, implementer or a co-author of the PR, issue or task. Every skill that approves, merges or closes runs it first. |
| [`din-maintainers.json`](din-maintainers.json) | Maps each person to their GitHub logins and display name. Logins listed together count as one person (Umer: `umeradl` + `umermjd11`). Add an entry when someone joins. |
| [`din-env.sh`](din-env.sh) | Machine-specific paths (`DIN_REPO`, `DIN_WORK`, `DIN_PY`, `DIN_NVM`). Source it. Override any value by exporting it first. |

## Setup (once per machine)

1. **`gh` logged in as yourself.** The skills act as whoever `gh api user` returns. They never switch accounts for you.
2. **Paths.** Check the defaults in [`din-env.sh`](din-env.sh). If yours differ, export your own values in your shell profile, for example:
```bash
export DIN_REPO=~/code/DevNet
export DIN_WORK=~/din-work
export DIN_PY=~/venvs/din/bin/python
```
`DIN_PY` needs Python 3.12, `torch`, and `pip install -e ".[test]"` of this repo.
3. **Tools.** `forge` on `PATH` at the version `ci.yml` pins (`FOUNDRY_VERSION`), and Node 20 (`npm`, `npx`).
4. **Optional: the push guard hook.** Only admins push to `develop` directly. If that's you, register the hook described in [`../skills/din-push-develop/README.md`](../skills/din-push-develop/README.md).

## Running the peer check by hand

```bash
python3 .claude/scripts/din_peer_check.py whoami
python3 .claude/scripts/din_peer_check.py pr 264 # before reviewing, approving or merging
python3 .claude/scripts/din_peer_check.py issue-approve 223 # before an approval verdict
python3 .claude/scripts/din_peer_check.py issue-close 227 # before closing as completed
python3 .claude/scripts/din_peer_check.py task Developer/tasks/task_240926_17.md
python3 .claude/scripts/din_peer_check.py admin # the emergency bypass needs the admin role
python3 .claude/scripts/din_peer_check.py path-b # merge path B: Umer only, plus the admin role
```

It exits with 0 when the action is OK, 1 when it's refused (the reasons are printed), and 2 on an error.

The check is deliberately conservative. For `issue-close`, everyone who worked on a merged PR that cross-references the issue counts as an implementer: its author and each commit's author, committer and `Co-Authored-By` co-authors. If a refusal looks wrong because the mention was incidental, hand the issue to a peer anyway. Don't work around the check.
18 changes: 18 additions & 0 deletions .claude/scripts/din-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Machine-specific paths for the din-* skills. Source it: `source .claude/scripts/din-env.sh`.
# Every value can be overridden by exporting it first (e.g. in your shell profile).
# The defaults are the original maintainer's layout.

: "${DIN_REPO:=$HOME/projects/devnet}" # main checkout of InfiniteZeroFoundation/DevNet
: "${DIN_WORK:=$HOME/tempdir/DIN}" # review worktrees (PRs/), merge-fix logs, push-check worktree + logs
: "${DIN_NVM:=$HOME/.nvm/nvm.sh}" # sourced for npm/npx if present (Node 20)

# Python 3.12 with torch and `pip install -e ".[test]"` of this repo.
if [ -z "${DIN_PY:-}" ]; then
if [ -x "$HOME/my_venvs/torchenv/bin/python" ]; then
DIN_PY=$HOME/my_venvs/torchenv/bin/python
else
DIN_PY=$(command -v python3)
fi
fi

export DIN_REPO DIN_WORK DIN_PY DIN_NVM
11 changes: 11 additions & 0 deletions .claude/scripts/din-maintainers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"repo": "InfiniteZeroFoundation/DevNet",
"path_b": ["Umer Majeed"],
"people": [
{"name": "Umer Majeed", "logins": ["umeradl", "umermjd11"]},
{"name": "Santiago Rodriguez Cetran", "logins": ["Santiagocetran"]},
{"name": "Robbert Abimbola", "logins": ["robertocarlous"]},
{"name": "Similoluwa Abidoye", "logins": ["Abidoyesimze"]},
{"name": "Abraham Nash", "logins": ["abrahamnash"]}
]
}
213 changes: 213 additions & 0 deletions .claude/scripts/din_peer_check.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
#!/usr/bin/env python3
"""Peer-rule check for the din-* skills (Developer/MAINTAINING.md No. 1).

Nobody approves, merges or closes their own work. Every din-* skill that
approves, merges or closes runs this first, as the active `gh` user, and stops
if it prints REFUSE.

Usage:
din_peer_check.py whoami print the active gh login and person name
din_peer_check.py pr <N> may I review / approve / merge PR <N>?
din_peer_check.py issue-approve <N> may I approve issue <N>'s plan?
din_peer_check.py issue-close <N> may I close issue <N> as completed?
din_peer_check.py task <task-file> may I close this task's Discussion?
din_peer_check.py admin do I hold the repo admin role (emergency bypass)?
din_peer_check.py path-b may I use merge path B? (Umer only, plus the admin role)

Exit status: 0 = OK, 1 = REFUSE (reasons printed), 2 = error.

One person can have several GitHub logins (Umer: umeradl + umermjd11). Those
are listed in din-maintainers.json next to this script and count as the same
person, so umeradl can't approve a umermjd11 PR.
"""
import json
import re
import subprocess
import sys
from pathlib import Path

CONFIG = json.loads((Path(__file__).with_name("din-maintainers.json")).read_text())
REPO = CONFIG["repo"]
PEOPLE = CONFIG["people"]
BOTS = {"web-flow", "github-actions[bot]", "dependabot[bot]", "Copilot", "claude"}


def gh(*args):
out = subprocess.run(["gh", *args], capture_output=True, text=True)
if out.returncode != 0:
print(f"ERROR: gh {' '.join(args)}: {out.stderr.strip()}", file=sys.stderr)
sys.exit(2)
return out.stdout


def gh_json(*args):
return json.loads(gh(*args) or "null")


def gh_list(endpoint):
"""Every item of a paginated list endpoint (works on gh versions without --slurp)."""
out = gh("api", "--paginate", endpoint, "--jq", ".[]")
return [json.loads(line) for line in out.splitlines() if line.strip()]


def person(ident):
"""Canonical person key for a login or display name; unknown idents map to themselves."""
key = (ident or "").strip().lower()
for p in PEOPLE:
if key == p["name"].lower() or key in (l.lower() for l in p["logins"]):
return p["name"]
return ident.strip()


def from_email(email):
m = re.match(r"^(?:\d+\+)?([^@]+)@users\.noreply\.github\.com$", email or "", re.I)
return m.group(1) if m else None


def co_authors(message):
found = []
for name, email in re.findall(r"^co-authored-by:\s*(.+?)\s*<([^>]*)>", message, re.I | re.M):
if email.lower() == "noreply@anthropic.com": # AI-attribution trailer, not a person
continue
login = from_email(email)
found.append(login or name)
return found


def me():
return gh("api", "user", "--jq", ".login").strip()


def verdict(actor, involved, what):
"""involved: {person: [reasons]}"""
mine = person(actor)
hits = involved.get(mine, [])
if hits:
print(f"REFUSE: {actor} ({mine}) can't {what}: {'; '.join(sorted(set(hits)))}.")
print("Hand it to a peer (Developer/MAINTAINING.md No. 1, No. 7).")
return 1
others = ", ".join(sorted(involved)) or "nobody"
print(f"OK: {actor} ({mine}) may {what}. Involved: {others}.")
return 0


def add(involved, ident, reason):
if ident and ident not in BOTS:
involved.setdefault(person(ident), []).append(reason)


def pr_contributors(involved, n, author, suffix=""):
"""Add PR <n>'s author and every commit author, committer and co-author."""
add(involved, author, f"author of PR No. {n}")
for c in gh_list(f"repos/{REPO}/pulls/{n}/commits"):
sha = c["sha"][:7]
if c.get("author"):
add(involved, c["author"]["login"], f"authored commit {sha}{suffix}")
else:
add(involved, c["commit"]["author"]["name"], f"authored commit {sha}{suffix}")
if c.get("committer"):
add(involved, c["committer"]["login"], f"committed {sha}{suffix}")
for ca in co_authors(c["commit"]["message"]):
add(involved, ca, f"co-author on {sha}{suffix}")


def check_pr(n):
actor = me()
pr = gh_json("api", f"repos/{REPO}/pulls/{n}")
involved = {}
pr_contributors(involved, n, pr["user"]["login"])
return verdict(actor, involved, f"review, approve or merge PR No. {n}")


def issue_people(n, closing):
issue = gh_json("api", f"repos/{REPO}/issues/{n}")
if issue.get("pull_request"):
print(f"ERROR: No. {n} is a PR; use `pr {n}`.", file=sys.stderr)
sys.exit(2)
involved = {}
if not closing:
add(involved, issue["user"]["login"], f"opened issue No. {n}")
for a in issue.get("assignees") or []:
add(involved, a["login"], f"assigned to issue No. {n}")
if closing:
for e in gh_list(f"repos/{REPO}/issues/{n}/timeline"):
src = (e.get("source") or {}).get("issue") or {}
if e.get("event") == "cross-referenced" and (src.get("pull_request") or {}).get("merged_at"):
m = src["number"]
pr_contributors(involved, m, src["user"]["login"], f" of merged PR No. {m}")
return involved


def check_issue(n, closing):
actor = me()
what = f"close issue No. {n} as completed" if closing else f"approve issue No. {n}"
return verdict(actor, issue_people(n, closing), what)


def check_task(path):
actor = me()
text = Path(path).read_text()
m = re.search(r"^\*\*Assigned to:\*\*\s*(.+)$", text, re.M)
if not m:
print(f"ERROR: no '**Assigned to:**' line in {path}", file=sys.stderr)
return 2
line = m.group(1)
involved = {}
handles = re.findall(r"@([A-Za-z0-9-]+)", line)
for h in handles:
add(involved, h, f"assigned to {Path(path).name}")
if not handles:
for name in re.split(r",| and |/", re.sub(r"\(.*?\)", "", line)):
if name.strip():
add(involved, name.strip(), f"assigned to {Path(path).name}")
return verdict(actor, involved, f"close {Path(path).name}")


def check_admin():
actor = me()
role = gh("api", f"repos/{REPO}/collaborators/{actor}/permission", "--jq", ".role_name").strip()
if role == "admin":
print(f"OK: {actor} holds the admin role (emergency bypass allowed).")
return 0
print(f"REFUSE: {actor} has '{role}', not admin. Use merge path A (Developer/MAINTAINING.md No. 4.4).")
return 1


def check_path_b():
"""Merge path B is Umer only (MAINTAINING No. 4.4), and needs the admin bypass."""
actor = me()
if person(actor) not in CONFIG["path_b"]:
print(f"REFUSE: {actor} ({person(actor)}) can't use merge path B; it's reserved for "
f"{', '.join(CONFIG['path_b'])} (Developer/MAINTAINING.md No. 4.4). Use path A.")
return 1
return check_admin()


def main(argv):
if not argv:
print(__doc__)
return 2
cmd, rest = argv[0], argv[1:]
if cmd == "whoami":
actor = me()
print(f"{actor} ({person(actor)})")
return 0
if cmd == "admin":
return check_admin()
if cmd == "path-b":
return check_path_b()
if not rest:
print(__doc__)
return 2
if cmd == "pr":
return check_pr(int(rest[0]))
if cmd in ("issue-approve", "issue-close"):
return check_issue(int(rest[0]), cmd == "issue-close")
if cmd == "task":
return check_task(rest[0])
print(__doc__)
return 2


if __name__ == "__main__":
sys.exit(main(sys.argv[1:]))
Loading