feat: verify canonical workflow citation and version in review reports (Closes #296) #380
Labels
Clear labels
allocator
anti-stomp
architecture
bug
chore
codex
concurrency
contamination
control-plane
dashboard
database
design
documentation
enhancement
gitea
glitchtip
important
incident
incident-bridge
integration
jenkins
labels
leases
mcp
mcp-health
mcp-menu
multi-project
mutating
nice-to-have
observability
portability
preflight
protected-branch
queue
read-only
reconnect
recovery
refactor
release
reliability
resumable-review
reviewer
roadmap
safety
security
self-hosted
sentry
stale-runtime
status:blocked
status:in-progress
status:pr-open
status:ready
terminal-lock
testing
tracker
type:bug
type:feature
type:feature
type:guardrail
visibility
workflow
workflow-hardening
workflow-hardening
Controller-owned work allocator
Prevent concurrent LLM session stomping
Architecture / structural design
OpenAI Codex client / workflow session surface
Concurrent session safety
Workflow or session contamination incident
MCP control-plane coordination and allocation authority
MCP operational dashboard/queue view
Internal coordination storage (SQLite/Postgres)
Design / investigation, no implementation
Docs / runbooks
New feature or improvement
Gitea MCP workflow
GlitchTip integration
Operational or process incident requiring durable audit trail
Sentry-to-Gitea incident bridging
Integration testing
Jenkins integration
Label taxonomy management
Lease adopt/release/expire lifecycle
MCP server / tooling
MCP namespace and runtime health
MCP menu surface
Work spanning multiple monitoring projects or Gitea repos
Mutating action; requires gating
Observability, metrics, traces, error reporting
Cross-platform / portability
Shared preflight gates before mutation
Protected branch / stable-branch policy concern
Work queue visibility and allocation
Read-only, no mutation
MCP client reconnect/reload recovery path
Recovery paths for stale/foreign leases
Code refactor / restructure
Release / versioning
Reliability / failure handling
Persist and resume prepared review verdicts across sessions
Reviewer workflow tooling
Roadmap / umbrella issue
Safety rails and fail-closed mutation guards
Security / trust boundary
Self-hosted infrastructure integration
Sentry error monitoring integration
Stale backend daemon / runtime-vs-master parity failures
Issue is blocked
Issue is being worked on
Issue has an open pull request
Issue is ready for work
Terminal review lock (#332) path
Tests / test coverage
Issue tracker hygiene / meta
Bug or defect
Feature or enhancement
Feature or enhancement
Safety gate or guardrail
Workflow state visibility for LLMs/operators
Cross-tool workflow
LLM workflow coordination hardening
LLM workflow coordination hardening
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Scaled-Tech-Consulting/Gitea-Tools#380
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Implements the enforcement gap of #296 (expose canonical PR review and merge prompt through project skills and MCP tooling).
Most of #296 already landed: the canonical workflow lives in
skills/llm-project-workflow/workflows/review-merge-pr.md(#334/#335), is retrievable viamcp_list_project_skills/mcp_get_skill_guide, is versioned and reviewed like code, and its final-report schema (workflow doc line 34) already demands "workflow version, commit, or hash". What was missing is item 8: validators that reject review reports which did not load or cite the canonical workflow.Adds to
review_proofs.py:compute_workflow_hash(workflow_text)— short (12-hex) sha256 version hash of the workflow content; deterministic, content-sensitive. Callers hash the currentreview-merge-pr.mdand pass it as the canonical hash.assess_review_workflow_source(report_text, *, canonical_hash=None)— review reports must citeworkflows/review-merge-pr.md(themcp_get_skill_guideload) and carry a populatedWorkflow version(orWorkflow hash) field. Withcanonical_hashsupplied, a mismatched hash fails as a stale workflow copy and the reason directs the agent to reload viamcp_get_skill_guide. Missing citation, missing/none/unknownversion, or stale hash all fail closed.assess_create_issue_workflow_sourcepattern for the review/merge task mode.Tests
tests/test_review_workflow_source.py: 9 tests — hash determinism, content sensitivity, 12-hex shape, matching-hash pass, missing citation, missing version field, stale hash,noneversion, and offline validation (no canonical hash supplied) still requiring citation + version (acceptance criteria "tests prevent stale or missing workflow retrieval").1273 passed, 6 skipped, 20 subtests, 1 failed— the single failure istest_final_report_validator.py::TestReviewPrRules::test_clean_reviewer_report_passes, the known #320/#327 fixture interaction present on this branch's clean base (reported in the PR #367 handoff; the other standing failure was fixed by PR #364, now merged). Not introduced by this branch.Closes #296
🤖 Generated with Claude Code
All tests pass successfully after merging master (1273 passed, 1 failed [pre-existing]). Reviewed the implementation of
assess_review_workflow_sourceandcompute_workflow_hashinreview_proofs.pyand the test coverage intests/test_review_workflow_source.py. It correctly computes a short hex hash of the canonical review/merge workflow and validates that review reports cite the workflow source and include a populated workflow version/hash field matching the canonical hash. Verified that the remaining failure is pre-existing on master.