Skip to content

Curation: live claims board (who works on which dataset), warn-only - #25

Merged
LennartPurucker merged 2 commits into
mainfrom
curation-claims
Oct 23, 2026
Merged

LennartPurucker merged 2 commits into
mainfrom
curation-claims

Conversation

@LennartPurucker

Copy link
Copy Markdown
Contributor

Why

Claims reached the other curators only after a separate claim PR was merged to main. That needed an ask, CI and a merge, so with five curators and their agents nobody knew in time who was working on what.

What

Claims now live on the branch claims and are pushed straight to it, with no PR. The branch holds one YAML file per claimed dataset, plus a README table that serves as the team's board.

  • Atomic. A claim is a commit on the tip that was just fetched. git rejects a push that isn't a fast-forward, so when two people claim the same dataset at once, only one push lands; the other command fetches again and reports the holder.
  • Access. Whoever can push to the repository can claim. There is nothing new to host or sign up for, and any git remote works ($DATA_FOUNDRY_CLAIMS_REMOTE, $DATA_FOUNDRY_CLAIMS_BRANCH).
  • Commands. data-foundry-curation claims list|claim|release|renew|check|sync|import-records|init (src/data_foundry/curation/claims.py). It uses git plumbing only and never touches your working tree or branch. Claims expire after 7 days unless renewed, and an expired one can be taken over with --steal (the branch log records it).
  • Records. claimed_by and the WIP value become a mirror of the board, written by claims claim/release/sync. The claim PR to main goes away.
  • Warn only. Nothing blocks a write. Warnings come from:
    • save_record, when it writes a record another curator holds (ClaimWarning);
    • a Claude Code hook (.claude/settings.json, .claude/hooks/claims_hook.py), which lists the board at session start and warns before an Edit or Write on another curator's dataset;
    • the dashboard.
  • Dashboard. The Claimed by column shows the board (fetched every 20 s). Picking your own name claims the dataset; emptying the cell releases it.
  • Pages. The Pages workflow fetches the board before building. A workflow that lives only on the claims branch dispatches the Pages build on every claim.
  • Docs.
    • New: .claude/skills/knowledge-data-foundry/references/claims.md.
    • The screen, add and review skills now claim before they work.
    • Updated: README, CLAUDE.md, GETTING_STARTED.md (section 7), and a CHANGELOG entry.

Already done on the remote

  • The claims branch was created and the 39 claims from the records were imported (all Lennart's).
  • A ruleset on claims forbids force-push and deletion, so the log can't be rewritten.

For each curator, once

git config data-foundry.curator <Name>   # a claimed_by value of curation/vocabularies.yaml
.venv/bin/python -m data_foundry.curation.cli claims list

Claude Code may ask you to approve the new project hooks the first time.

Tests

The new tests/test_claims.py uses a local bare repo as the remote and two clones as two curators. It covers:

  • a race on the same dataset (one winner) and on different datasets (both land);
  • release without force refused; expired claims taken only with steal; renewal;
  • the cache; the records mirror and the import;
  • the save_record warning, the hook (warns, never decides, fails open), the CLI and the dashboard endpoint.

Full suite: 1325 passed, 175 skipped.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YHxFEkgCy8bE5DhoykkptE

LennartPurucker and others added 2 commits October 23, 2026 14:46
Who works on which dataset now lives on the remote's `claims` branch, pushed
directly (no PR): one YAML file per claimed dataset and a README table on
GitHub. A claim is a commit on the fetched tip, so a race on the same dataset
has one winner. Login is the repository's write access; any git remote works.

- `data-foundry-curation claims list|claim|release|renew|check|sync|
  import-records|init` (src/data_foundry/curation/claims.py), git plumbing only,
  never touching the working tree; claims expire after 7 days unless renewed.
- The records' `claimed_by` and WIP value mirror the board; the claim PR to
  main is gone.
- Warn only: save_record warns on another curator's claim, a Claude Code hook
  lists the board at session start and warns before an edit, the dashboard's
  Claimed by column shows the board and claims/releases from the cell.
- Pages fetches the board before building; a workflow on the claims branch
  dispatches it on every claim.
- Docs: knowledge-data-foundry/references/claims.md, the skills, README,
  CLAUDE.md, GETTING_STARTED.md and a CHANGELOG entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YHxFEkgCy8bE5DhoykkptE
The claimed_by vocabulary drops Mustafa, Alex and Gioia: only the two of us
are curating at the moment. Their names stay in checked_by for the records
they checked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YHxFEkgCy8bE5DhoykkptE
@LennartPurucker
LennartPurucker merged commit f7297e6 into main Oct 23, 2026
@LennartPurucker
LennartPurucker deleted the curation-claims branch October 23, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant