Skip to content

fix: make the valid contrib-state fixture time-independent - #8

Merged
ahrazzle merged 1 commit into
mainfrom
fix/contrib-state-fixture-expiry
Oct 9, 2026
Merged

ahrazzle merged 1 commit into
mainfrom
fix/contrib-state-fixture-expiry

Conversation

@abu-aska

@abu-aska abu-aska commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

What

records/examples/valid/CONTRIB-STATE.md is the repository's own valid fixture, but it carried two timestamps that are now in the past:

field shipped value now
expires= (grant g-7) 2026-09-24T00:00:00Z expired
lease_until= (lane row) 2026-09-17T17:22:10Z expired

scripts/protean-ops/check-contrib-state.py reads the real clock unless --now is passed, so from 2026-09-25 the gate fails against the repo's own valid fixture:

$ python3 scripts/protean-ops/check-contrib-state.py records/examples/valid/CONTRIB-STATE.md
FAIL: grant 'g-7': expired at 2026-09-24T00:00:00Z
check-contrib-state: FAIL  scanned=5  violations=1

This is not cosmetic: op-contrib-state is a declared post-install gate in protean-ingredient.json, so a fresh bash install.sh --all of the kit fails closed with exit 5 when it reaches protean-ops.

Fix

Align records/examples/valid/CONTRIB-STATE.md with its already-correct twin tests/fixtures/valid/CONTRIB-STATE.md, which uses non-expiring values (expires=2099-01-01T00:00:00Z, lease_until=2099-01-01T00:00:00Z). The two files were byte-identical except for these two fields.

Also add the two declared-but-uncovered gates to the CI gate step — op-delegation and op-contrib-state — so the fixture and the gate are exercised on every push/PR. They were absent from .github/workflows/verify.yml, which is why nothing caught this.

Evidence

  • Live on upstream main at ab48260634c66525e107ece2736b1604d8156a6a (the gate fails on a pristine clone).
  • python3 -m unittest discover -s tests → 151 tests, OK.
  • Every declared gate in protean-ingredient.json exits 0 from a fresh clone, including the previously failing op-contrib-state:
    [0] internal-names  [0] op-rotation  [0] op-inflight  [0] op-learnings
    [0] op-hotpath-freeze  [0] op-decision-report  [0] op-delegation  [0] op-contrib-state
    

Scope

  • records/examples/valid/CONTRIB-STATE.md — 2 field values (fixture data, not schema or gate behaviour).
  • .github/workflows/verify.yml — 2 added gate commands.
  • CHANGELOG.md — Unreleased entry.

No change to protean-ingredient.json, the payload, install targets, gate names, or the requires set, so this is a patch-level fix per CONTRIBUTING.md.

Note on attribution

The commit is authored under the authenticated operator account (abu-aska). Per the kit's commit-identity convention, team-owned repositories prefer a role codename; there is no per-codename token on this machine, so the operator identity is used. Happy to rewrite the commit under a specific codename if you name one.

The shipped valid fixture pinned expires=2026-09-24T00:00:00Z and
lease_until=2026-09-17T17:22:10Z, both now in the past.
check-contrib-state.py reads the real clock unless --now is given, so the
gate reported "grant 'g-7': expired" (exit 1) against the repository's own
valid fixture from 2026-09-25 onward, and the kit installer's post-install
gate for protean-ops failed closed (exit 5) on a fresh machine.

Align records/examples/valid/CONTRIB-STATE.md with its tests/fixtures/valid
counterpart (expires=2099-01-01, lease_until=2099-01-01), which the gate
suite already treats as the non-expiring valid case.

Add the op-delegation and op-contrib-state commands the descriptor declares
to the CI gate step; they were absent, so nothing exercised either gate or
the fixture they read.

Verified: python3 -m unittest discover -s tests passes (151 tests); every
declared gate in protean-ingredient.json exits 0 from a fresh clone.
@ahrazzle
ahrazzle merged commit aa3d40d into main Oct 9, 2026
2 checks passed
@ahrazzle
ahrazzle deleted the fix/contrib-state-fixture-expiry branch October 9, 2026 09:50
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.

2 participants