8000 ci(threat-model): check the threat model's prose, YAML and JSON agree by adeelahmad · Pull Request #207 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

ci(threat-model): check the threat model's prose, YAML and JSON agree - #207

Merged
adeelahmad merged 1 commit into
mainfrom
claude/project-thread-czgsgi
Oct 6, 2026
Merged

adeelahmad merged 1 commit into
mainfrom
claude/project-thread-czgsgi

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: checking the threat model meant running the threat-model plugin's validate_model.py by hand. That script ships with the plugin, not the repo, so cloud sessions and CI couldn't run it.

After: ci/validate_threat_model.py runs in a new threat model workflow on GitHub-hosted runners whenever threat-model.md, .yaml or .json change. It checks:

  • the YAML's prose_version is the sha256 of the prose
  • both companions parse and have their required keys
  • the YAML and JSON name the same repository, commit and date
  • the P-, N- and KNF- ids are the same in all three files, and the MX- ids match in both companions
  • every id mentioned anywhere is defined
  • open questions are numbered Q1..Qn, and every Qn cited is one of them

Run against main (with #205), it flagged one problem. Q20's ruling claims P-CONVERT-TIMEOUT, but no table defined it. This PR adds it to §1.11, the YAML and the JSON as correctness-only, citing the timeouts from #202. The x-process-control matrix row changes from unresolved to claimed, and N-DECODERS and N-BOMBS now point to the new property. The prose hash is refreshed.

Motivation and Context

The threat model check now runs in CI, so it no longer needs a local run.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests.
  • My change requires documentation updates, and I have updated docs/ accordingly. (DEVLOG points at the new script.)

🤖 Generated with Claude Code

https://claude.ai/code/session_01AmVP1oJMKTCBvDP6eJVnrX


Generated by Claude Code

The threat-model plugin's validate_model.py lives outside the repo, so cloud
sessions and CI couldn't run it. ci/validate_threat_model.py checks the prose
hash, the property ids across all three files and the open-question numbers,
and a workflow runs it on GitHub-hosted runners when those files change.

It flagged P-CONVERT-TIMEOUT: Q20's ruling claims it, but no table defined it.
Add it to §1.11, the YAML and the JSON, and turn the x-process-control row
from unresolved to claimed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmVP1oJMKTCBvDP6eJVnrX
@adeelahmad adeelahmad self-assigned this Oct 6, 2026
@adeelahmad
adeelahmad merged commit a040749 into main Oct 6, 2026
6 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-czgsgi branch October 6, 2026 11:47
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

0