Skip to content

feat: harden standards spine to M3 readiness#5

Merged
mdheller merged 2 commits intomainfrom
copilot/harden-standards-spine-to-m3-readiness
Apr 30, 2026
Merged

feat: harden standards spine to M3 readiness#5
mdheller merged 2 commits intomainfrom
copilot/harden-standards-spine-to-m3-readiness

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 29, 2026

Advances SocioProphet/functional-model-surfaces from M2 to M3 by adding CI-enforced negative fixtures, a negative fixture runner, and the two standards documents required by the M3 gate.

Negative fixtures (fixtures/invalid/)

Four invalid documents — two per schema — each rejected for a distinct schema reason:

  • functional-service.missing-schema-version.json → missing required schemaVersion
  • functional-service.invalid-status.jsonstatus: "published" not in enum
  • maturity.invalid-level.yamllevel: M6 not in enum
  • maturity.empty-owners.yamlowners: [] violates minItems: 1

Negative fixture runner (tools/run_negative_fixtures.py)

Iterates all four fixtures, asserts each raises jsonschema.ValidationError, prints the rejection reason, and exits non-zero if any fixture unexpectedly passes.

Makefile

Added negatives target wired into validate:

validate: lint examples maturity negatives
negatives:
    python3 tools/run_negative_fixtures.py

Documentation

  • docs/MATURITY_MODEL.md — Full M0–M5 gate definitions with evidence requirements per level, the repo.maturity.yaml evidence format, Sociosphere/workspace-inventory ingestion contract (pull model, scorecard fields, registration steps), and a plane taxonomy table distinguishing standards, lab, runtime, governance, SourceOS-carry, and workspace-governance concerns.
  • docs/LAB_TEMPLATE.md — Required SociOS-Linux/*lab skeleton, annotated functional-service.v1 manifest with field-level guidance, promotion chain diagram, prohibited content table (weights, secrets, SourceOS image state), minimum Makefile and CI snippet, and a pre-promotion checklist.

repo.maturity.yaml

Promoted maturity.level M2 → M3, targetLevel M3 → M4, lastKnownStatus unknownpassing, evidence list updated to name all new artifacts, nextActions updated to M4 targets.

- Add fixtures/invalid/ with 4 negative fixtures (2 functional-service, 2 maturity)
- Add tools/run_negative_fixtures.py to verify negative fixtures fail validation
- Update Makefile to include negatives target in validate
- Add docs/MATURITY_MODEL.md (M0-M5, evidence requirements, Sociosphere ingestion)
- Add docs/LAB_TEMPLATE.md (lab repo skeleton and functional-service.v1 manifest)
- Update repo.maturity.yaml to M3 with updated evidence and nextActions

Agent-Logs-Url: https://github.com/SocioProphet/functional-model-surfaces/sessions/503b1a79-8d44-4b4c-b9a5-f0b46ac4b873

Co-authored-by: mdheller <21163552+mdheller@users.noreply.github.com>
Copilot AI changed the title [WIP] Harden standards spine to M3 readiness feat: harden standards spine to M3 readiness Apr 29, 2026
Copilot AI requested a review from mdheller April 29, 2026 20:36
@mdheller mdheller requested a review from Copilot April 30, 2026 10:53
@mdheller mdheller marked this pull request as ready for review April 30, 2026 10:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR advances the repository’s maturity posture toward the M3 gate by adding CI-enforced negative fixtures, a runner to assert invalid documents are rejected by the schemas, and updated maturity/documentation artifacts describing the standards and lab expectations.

Changes:

  • Add a negative fixture runner (tools/run_negative_fixtures.py) and wire it into make validate.
  • Introduce invalid fixtures under fixtures/invalid/ to ensure schemas reject malformed records for distinct reasons.
  • Promote repo.maturity.yaml from M2→M3 (and target M3→M4) and add M3 gate documentation (docs/MATURITY_MODEL.md, docs/LAB_TEMPLATE.md).

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/run_negative_fixtures.py Adds a CLI runner that validates the repo’s schemas reject known-bad fixtures.
Makefile Adds negatives target and includes it in validate.
fixtures/invalid/functional-service.missing-schema-version.json Negative fixture to assert required schemaVersion is enforced.
fixtures/invalid/functional-service.invalid-status.json Negative fixture to assert service status enum is enforced.
fixtures/invalid/maturity.invalid-level.yaml Negative fixture to assert maturity level enum is enforced.
fixtures/invalid/maturity.empty-owners.yaml Negative fixture to assert owners minItems: 1 is enforced.
repo.maturity.yaml Updates maturity level/targets and evidence/nextActions for M3 readiness.
docs/MATURITY_MODEL.md Documents M0–M5 gates and workspace-inventory ingestion expectations.
docs/LAB_TEMPLATE.md Documents required lab repo skeleton and functional-service manifest guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +57 to +61
schema = json.loads(Path(schema_file).read_text())
document = load(doc_file, fmt)
try:
jsonschema.validate(instance=document, schema=schema)
unexpected_passes.append(doc_file)
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

The negative fixture runner calls jsonschema.validate(...) directly but does not run Draft202012Validator.check_schema(schema) like the other validation helpers in tools/. Adding a schema check would make failures clearer (schema errors vs. fixture validation errors) and keep validation behavior consistent across scripts.

Copilot uses AI. Check for mistakes.
Comment thread docs/LAB_TEMPLATE.md
Comment on lines +139 to +141
| `service.ownerRepository` | Required | The lab repository in `org/repo` form. |
| `service.status` | Required | Use `draft` or `experimental` while in the lab. |
| `function` | Required | One of the enumerated functional families in the schema. |
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

The guidance for service.status is internally inconsistent: the field table says to use draft or experimental in the lab, but the pre-promotion checklist later says status must be experimental or candidate (not draft). Please clarify the intended rule (e.g., allow draft during development but require experimental/candidate for promotion PRs) so readers don’t follow conflicting instructions.

Copilot uses AI. Check for mistakes.
Comment on lines +56 to +58
for schema_file, doc_file, fmt in FIXTURES:
schema = json.loads(Path(schema_file).read_text())
document = load(doc_file, fmt)
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

run_negative_fixtures.py assumes it is executed from the repo root (all schema/fixture paths are relative to the current working directory). This is brittle when the script is run directly from another directory or invoked by tooling; consider resolving paths relative to the repository root (e.g., based on __file__) before reading schemas/fixtures.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

@codex Please review this PR in the SocioProphet/functional-model-surfaces Codex environment. Do not broaden scope. Inspect the live repo and determine whether the M3 readiness changes, negative fixtures, maturity docs, and validation wiring satisfy the PR claims. Return a merge/no-merge recommendation with concrete blockers, or open one small follow-up PR only if there is a real defect. Include validation reasoning.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

ℹ️ 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".

Copy link
Copy Markdown
Member

@mdheller mdheller left a comment

Choose a reason for hiding this comment

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

Reviewed scope and validation. Codex review found no major issues. Changed files are bounded to M3 readiness docs, negative fixtures, repo maturity metadata, Makefile, and the negative fixture runner. Validation workflow is green.

@mdheller mdheller merged commit e7e93ca into main Apr 30, 2026
8 checks passed
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.

Agent task: harden standards spine to M3 readiness

3 participants