Skip to content

fix(config): use [metadata] section header in gittuf and hello TOMLs - #383

Merged
Marc-cn merged 1 commit into
darnitdevorg:mainfrom
Marc-cn:fix/framework-metadata-section
Aug 21, 2026
Merged

fix(config): use [metadata] section header in gittuf and hello TOMLs#383
Marc-cn merged 1 commit into
darnitdevorg:mainfrom
Marc-cn:fix/framework-metadata-section

Conversation

@Marc-cn

@Marc-cn Marc-cn commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Both plugin TOMLs used [framework] where FrameworkConfig requires [metadata], so both failed schema validation once the packaging fix made them loadable.

  • packages/darnit-gittuf/src/darnit_gittuf/gittuf.toml:1
  • packages/darnit-hello/src/darnit_hello/hello.toml:16

Two lines, header rename only.

Fixes #361

Type of Change

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature causing existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)

Framework Changes Checklist

If this PR modifies the darnit framework (packages/darnit/):

  • n/a — no changes under packages/darnit/, only two plugin TOMLs

Control/TOML Changes Checklist

If this PR modifies controls or TOML configuration:

  • Control metadata defined in TOML (not Python code) — unchanged, headers only
  • SARIF fields (description, severity, help_url) included where appropriate — n/a, no control definitions touched
  • Ran validation to confirm TOML schema compliance

Testing

  • Tests pass locally
  • Added tests for new functionality (if applicable) — n/a
  • Linting passes (uv run ruff check .)
- gittuf
  Display: Gittuf Policy Checks
  Version: 0.1.0
  Spec: gittuf v0.1
  Controls: 3
- hello
  Display: Hello — Minimal Darnit Plugin
  Version: 0.1.0
  Spec: hello v0.1
  Controls: 1

Also confirmed directly:

>>> load_framework_by_name('gittuf').metadata
name='gittuf' display_name='Gittuf Policy Checks' version='0.1.0'
schema_version='0.1.0-alpha' spec_version='gittuf v0.1' ... url=None

uv run pytest tests/darnit_gittuf -q passes. There is no tests/darnit_hello directory.

Additional Notes

Both plugin TOMLs used [framework] where FrameworkConfig requires
[metadata], so both failed schema validation once the packaging fix
made them loadable.

Fixes darnitdevorg#361

Signed-off-by: Marco De Vincenzi <md6796@nyu.edu>

@mlieberman85 mlieberman85 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Confirmed the fix locally:

  • After checkout, load_framework_by_name('gittuf').metadata and load_framework_by_name('hello').metadata both return populated FrameworkMetadata with the expected name/display_name/version/spec_version.
  • pytest tests/darnit_gittuf -q -- 21 pass.
  • No stragglers: grep -rn '^\[framework\]' packages/ scripts/ docs/ returns nothing after the change; baseline and reproducibility already use [metadata], so this brings gittuf and hello in line with the schema (FrameworkConfig.metadata: FrameworkMetadata, framework_schema.py:1477).
  • CI "Plugin discovery smoke (darnit-hello)" check is the equivalent of a hello test-suite here and it's green.

Two lines, right fix, closes #361 cleanly. LGTM.

@Marc-cn
Marc-cn merged commit 3339b05 into darnitdevorg:main Aug 21, 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.

gittuf.toml and hello.toml use [framework] section header but loader requires [metadata]

2 participants