Skip to content

Add resolved council seats contract-v2.3 candidate - #517

Closed
brettheap wants to merge 1 commit into
mainfrom
026-add-resolved-council-seats
Closed

brettheap wants to merge 1 commit into
mainfrom
026-add-resolved-council-seats

Conversation

@brettheap

Copy link
Copy Markdown
Contributor

Summary

  • Adds a domain-neutral council-convening family: a closed resolved-roster/provenance contract, deterministic validator and corpus, and release candidate contract-v2.3.
  • Includes behavior-preserving test modularization while keeping successor/runtime ownership separate.

Verification

  • OpenSpec strict: 78 passed, 0 failed.
  • Council validator: 92 tests; strict validator: 14 cases, 0 findings.
  • Full suites: 7774 passed and 7784 passed, with 338 deselected; normative timeout node: 2 passed.
  • 32-case matrix passed twice; 22 YAML duplicate scan; 21 Python size scan.
  • 224-member inventory SHA-256: b90065d7bcc9fcba067edcd824ac9557db23a681827c60c0f24d67ada23b47ff.
  • VP-5: pass (release verify-commit: pass).

Testing commands:

openspec validate add-resolved-council-seats --strict
.venv/bin/python scripts/validate-council-convening.py --strict
.venv/bin/python -m pytest tests --ignore=tests/hermes_runtime_contracts/postgres -q
.venv/bin/python -m pytest tests -m 'not postgres' -q

Safety and Gates

External successor/runtime/OIDC/deployment/cutover evidence remains open. Merge requires A3; the annotated tag requires A4. No activation occurs in this PR.

Copilot AI lite review requested due to automatic review settings August 30, 2026 13:44

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @brettheap! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces a new domain-neutral council-convening contract family (schema + indexed conformance corpus + deterministic validator) and wires it into the repo’s release/contract surfaces as a contract-v2.3 candidate. It also modularizes the Hermes runtime validator CLI tests by extracting shared helpers into support modules.

Changes:

  • Add contracts/council-convening/ (closed Draft 2020-12 schema, indexed fixtures, and orientation/ownership docs).
  • Add scripts/validate-council-convening.py + scripts/council_convening_validation/* implementing a deterministic validator and YAML loader with adversarial hardening.
  • Register the new family in contracts/README.md, contracts/manifest.yaml, contracts/hermes-runtime/contract-index.yaml, and contracts/CHANGELOG.md, plus add feature planning artifacts under specs/026-add-resolved-council-seats/.

Reviewed changes

Copilot reviewed 60 out of 61 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/hermes_runtime_contracts/validator_cli_support.py New shared helpers/fixtures for Hermes runtime validator CLI tests
tests/hermes_runtime_contracts/test_validator_cli.py Refactor to use shared support helpers; keep core CLI behavior tests
tests/hermes_runtime_contracts/test_validator_cli_snapshot.py New isolated-snapshot tests moved out of the main CLI test module
tests/council_convening/validator_cli_support.py CLI helpers + temporary isolated validator setup for council-convening tests
tests/council_convening/test_validator_cli.py End-to-end CLI protocol + deterministic output + conformance/perf assertions
tests/council_convening/test_us3_contract.py Tests that acceptance-map + successor gating remains honest/open for externals
tests/council_convening/test_contract.py Schema/index parity, closure, and shape invariants for the new family
tests/council_convening/test_adversarial_boundaries.py Adversarial YAML/path/provenance tests to enforce fail-closed parsing
tests/council_convening/support.py Shared test utilities for schema/index/acceptance-map loading and helpers
tests/council_convening/init.py Package marker for council_convening tests
specs/026-add-resolved-council-seats/tasks.md Implementation task ledger for the feature
specs/026-add-resolved-council-seats/spec.md Feature specification defining FR/SC coverage and boundaries
specs/026-add-resolved-council-seats/research.md Design decisions and tradeoffs for the neutral contract family
specs/026-add-resolved-council-seats/quickstart.md Operator quickstart for running local provider gates and building a candidate
specs/026-add-resolved-council-seats/plan.md Implementation plan and repo structure for the feature
specs/026-add-resolved-council-seats/data-model.md Data model + invariants + stable finding codes
specs/026-add-resolved-council-seats/contracts/successor-handoff.md Successor ownership/activation responsibilities and evidence boundaries
specs/026-add-resolved-council-seats/contracts/council-convening-envelope.md Planning contract describing the envelope and normative validation steps
specs/026-add-resolved-council-seats/contracts/conformance-corpus.md Planning contract for the indexed portable conformance corpus
specs/026-add-resolved-council-seats/contracts/acceptance-map.yaml Machine-readable mapping of requirements/outcomes to gates
specs/026-add-resolved-council-seats/checklists/requirements.md Spec quality checklist for the feature
scripts/validate-council-convening.py Entrypoint wrapper for the council-convening validator
scripts/council_convening_validation/yaml_io.py YAML loader/normalizer with duplicate-key detection and portability checks
scripts/council_convening_validation/validation.py Case validation: schema gating + provenance + roster arithmetic findings
scripts/council_convening_validation/runner.py Execution runner and expectation checks producing deterministic reports
scripts/council_convening_validation/provenance.py Provenance evaluation and stable refusal code selection
scripts/council_convening_validation/paths.py Canonical paths for schema/index/fixtures
scripts/council_convening_validation/models.py Typed models + deterministic JSON report projection
scripts/council_convening_validation/index.py Fixture index parsing + path containment + parity checks
scripts/council_convening_validation/fixture.py Fixture input parsing (convening + resolver inputs)
scripts/council_convening_validation/cli.py CLI surface (--strict, --case, --json) and stable output formatting
scripts/council_convening_validation/init.py Package exports for validator components
openspec/changes/add-resolved-council-seats/tasks.md Records successor feature IDs and keeps external evidence explicitly open
openspec/changes/add-resolved-council-seats/specs/roles-authority-model/spec.md Governing OpenSpec deltas for roster/provenance/freeze semantics
openspec/changes/add-resolved-council-seats/proposal.md Ratified proposal describing breaking hard-cutover semantics
openspec/changes/add-resolved-council-seats/design.md Governing design rationale for the neutral contract boundary
openspec/changes/add-resolved-council-seats/.openspec.yaml Packet metadata including origin/approval info
docs/roles-and-authority.md Canonical doc amended to include resolved convening authority semantics
contracts/README.md Contract catalog entry for council-convening family and validator
contracts/manifest.yaml Bump bundle version to contract-v2.3 and register new contract artifacts
contracts/hermes-runtime/contract-index.yaml Add council-convening artifacts into Hermes runtime contract index
contracts/council-convening/resolved-council-convening.schema.yaml New closed Draft 2020-12 schema for the resolved convening
contracts/council-convening/README.md New family orientation/ownership/evidence/prohibited-data documentation
contracts/council-convening/fixtures/positive/standing-roster.yaml Positive fixture: standing seats only
contracts/council-convening/fixtures/positive/conditional-seat-required.yaml Positive fixture: conditional seat required
contracts/council-convening/fixtures/negative/rule-revision-unavailable.yaml Negative fixture: immutable rule unavailable
contracts/council-convening/fixtures/negative/roster-unknown-seat.yaml Negative fixture: unknown seat present
contracts/council-convening/fixtures/negative/roster-standing-incomplete.yaml Negative fixture: missing standing seat
contracts/council-convening/fixtures/negative/roster-mismatch.yaml Negative fixture: roster differs from independent reproduction
contracts/council-convening/fixtures/negative/roster-malformed.yaml Negative fixture: invalid roster shape
contracts/council-convening/fixtures/negative/roster-empty.yaml Negative fixture: empty roster
contracts/council-convening/fixtures/negative/roster-duplicate.yaml Negative fixture: duplicate seat IDs
contracts/council-convening/fixtures/negative/roster-absent.yaml Negative fixture: roster absent post-cutover
contracts/council-convening/fixtures/negative/provenance-opaque.yaml Negative fixture: provenance absent/opaque
contracts/council-convening/fixtures/negative/fact-missing.yaml Negative fixture: missing consumed fact
contracts/council-convening/fixtures/negative/condition-result-drift.yaml Negative fixture: producer vs independent condition evaluation drift
contracts/council-convening/fixtures/negative/candidate-head-stale.yaml Negative fixture: candidate head changed since resolution
contracts/council-convening/fixtures/index.yaml Ordered fixture index with expected outcomes and primary findings
contracts/CHANGELOG.md Add contract-v2.3 candidate entry describing the additive new family

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +142 to +143
if value is None or isinstance(value, str | bool | int | float):
return value

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 58452d538f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +81 to +83
candidate = mapping(provenance["candidate"], "candidate", path)
if string(candidate["head_revision"], "candidate head revision", path) != resolver.candidate_head:
return ProvenanceRefused("candidate_head_stale")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Bind candidate-head lookups to the candidate identity

When candidate.repository or candidate.pull_request is changed while head_revision remains the same, this comparison still accepts the convening because ResolverInput carries only an unkeyed head string. The validator therefore cannot establish that the authoritative head was obtained for the candidate named in the provenance, allowing a fixture with mismatched candidate identity to pass; include the repository and pull-request identity in the resolver result and compare them before accepting the head.

Useful? React with 👍 / 👎.

Comment on lines +59 to +62
expectation_valid = outcome == "accept" and primary is None
expectation_valid = expectation_valid or (
outcome == "refuse" and isinstance(primary, str) and bool(primary)
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enforce case class against the expected outcome

If an index entry is labeled positive with expected_outcome: refuse (or negative with accept), this check accepts it because it validates only the primary finding/outcome pair and never relates class to the outcome. The runner can consequently report a passing corpus even though positive fixtures are required to accept with no findings and negative fixtures are required to refuse; reject class/outcome mismatches while parsing the entry.

Useful? React with 👍 / 👎.

@brettheap

Copy link
Copy Markdown
Contributor Author

This PR is CONFLICTING with main, and as a result its required checks are not running at all — they are not queued, they will not arrive, and nothing on the PR says so. Flagged by another session at Brett's request; verified on this PR specifically, not inferred from a pattern.

What was measured here

gh pr view --json mergeable returns CONFLICTING (confirmed on a second query — the first often returns UNKNOWN, which is the placeholder that hides this). The check-runs on this PR's head are only merge-master-approval and copilot-pull-request-reviewer. The two the ruleset actually requires — pytest-suite and wallet-validation — have no run on this head.

Why it looks like a queue

GitHub cannot compute a merge ref for a conflicted PR, so every workflow triggered on: pull_request that needs one simply never starts. merge-master-approval keeps reporting green because it does not need one. The result reads as "CI is slow" rather than "CI will never run", and mergeable sits at UNKNOWN on a first query, which reads as "not computed yet" rather than "conflicted".

This cost another lane three pushes and several hours on #544 today before the cause was found, which is why it is being reported rather than left to be rediscovered.

The fix

Merge origin/main into the branch — do not rebase and do not force-push, per the standing rule for refreshing a change branch. Once the merge ref computes, the required checks fire on the next push and the PR reports honestly again.

Worth knowing: on #544 main advanced again during the conflict resolution, so the first merge was already stale by the time it landed and a second was needed. Re-read origin/main immediately before pushing rather than trusting a fetch from the start of the work.

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1d

CLOSED — superseded by the release history, on Brett Heap's word (2026-09-02, in session: "close 517").

This PR proposes a contract-v2.3 candidate. Since it was opened, contract-v2.4, contract-v2.5 and contract-v3.0 have been cut and tagged (v2.6 declared and superseded unpublished), the bundle's inventory has been re-baselined three times, and the branch is CONFLICTING with main with its required checks not running. A bundle candidate cannot be rebased across a major; if the resolved-council-seats content is still wanted it re-enters as a fresh OpenSpec proposal fresh-counted at the current bundle per docs/contract-versioning-policy.md. Branch left in place for that purpose; it is in the prunable set only if the owner says so.

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