Final-report validator crashes on non-dict action_log and demands forbidden legacy fields #698
Closed
opened 2026-07-13 09:28:21 -05:00 by jcwalker3
·
7 comments
No Branch/Tag Specified
master
fix/issue-987-native-mcp-bootstrap
feat/issue-985-project-scoped-launcher-identity
fix/issue-983-cross-repo-base-ref
feat/issue-980-stale-worker-retirement
fix/issue-975-client-identity-heartbeat
fix/issue-973-cross-repo-canonical-roots
fix/issue-970-safely-resolve-missing-worktrees
fix/issue-969-native-mcp-bootstrap
feat/issue-664-break-glass-restart
feat/issue-708-mcp-namespace-attachment
feat/issue-665-restart-audit
fix/issue-700-durable-walls
fix/issue-704-prevent-env-workspace-bindings
feat/issue-707-cross-project-boundaries
fix/issue-690-review-profile-switch-guard
fix/issue-953-bootstrap-lock-provenance
feat/issue-949-native-fleet-inventory
fix/issue-943-runtime-context-helpers
fix/issue-945-owning-pr-renewal-evidence
fix/issue-941-scope-guard-bootstrap-wiring
docs/issue-930-remote-mcp-coupling-inventory
fix/issue-892-author-bootstrap-deadlock
fix/issue-686-detect-reject-manual-mcp
fix/issue-672-mcp-config-drift
fix/issue-689-deterministic-mcp-namespace
feat/issue-666-concurrent-mcp-restart-tests
feat/issue-659-maintenance-drain-mode
feat/issue-648-notifications-console
fix/issue-670-direct-master-incident
feat/issue-644-console-recovery
feat/issue-650-providers-insights
feat/issue-669-scoped-component-recovery
docs/issue-668-mcp-ha-rolling-restart
feat/issue-667-console-restart-controls
feat/issue-645-linkage-console
feat/issue-643-request-preview-initiate
fix/issue-897-permission-stale-runtime-classification
feat/issue-641-runtime-session-view
feat/issue-663-restart-classes
feat/issue-661-drain-proof-hard-gate
fix/issue-854-semantic-container-exclusion
issue-640
fix/issue-682-starlette-httpx2
v1.1.0
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
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
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
Something is not working
This issue or pull request already exists
New feature
Need some help
Something is wrong
More information is needed
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Scaled-Tech-Consulting/Gitea-Tools#698
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.
The final-report validator suffered from several regressions when validating blocked or error-state reports:
action_loginline without checking types. When passed strings (e.g. malformed JSON or LLM mistakes), it crashed withAttributeError: 'str' object has no attribute 'get'.HANDOFF_ROLE_FIELDS["review"]demanded legacy fields (Pinned reviewed head,Scratch worktree used,Worktree path,Worktree dirty,Mutations,Next) which are explicitly forbidden byreview_final_report_schema.py.Candidate head SHA: none) and required approval/merge live-head fields although validation never began.I've fixed this locally by validating
isinstance(e, dict)and removing the legacy fields fromreview_proofs.py.[THREAD STATE LEDGER] Issue #698 — provenance classification: diagnostic lead only; contaminated implementation was reverted and must be recreated
What is true now:
final_report_validator.py(isinstance guards for non-dictaction_log) andreview_proofs.py(HANDOFF_ROLE_FIELDS legacy-field removal) that were reverted to master2376567during containment. The diagnostic observation itself is treated as a valid lead: validator crash behavior and legacy-field demands are worth fixing — but nothing here is proven, and no implementation exists.2376567; no trace of the contaminated edits remains in the working tree.What changed:
What is blocked:
Who/what acts next:
branches/worktree (validator robustness for malformed action_log plus schema/field consistency, with a regression matrix), then hands off to an independent reviewer and the canonical merger with proof the merge-committed code is active in managed namespaces.Canonical Issue State
STATE:
diagnostic-lead-reimplementation-required
WHO_IS_NEXT:
author
NEXT_ACTION:
Recreate the final-report validator/schema consistency fix from scratch through the canonical workflow after #699 and #697 land; treat the prior implementation as forensic evidence only.
NEXT_PROMPT:
WHAT_HAPPENED:
The contaminated controller run edited the root checkout directly to patch the validator and proof fields; containment reverted those edits; this issue survives as the diagnostic lead for a clean reimplementation.
WHY:
Contaminated edits carry no trustworthy provenance and were never proven by native-MCP validation, so the observation is kept but the implementation must be recreated through the canonical workflow.
RELATED_PRS:
none yet — no PR exists for this issue; PR #696 is a separate track (security hold per its comment 11071).
BLOCKERS:
Process/rule blocker — #699 and #697 must land first per the canonical order in incident #700.
VALIDATION:
Root checkout confirmed clean at
2376567(git status --porcelain empty); no branch or PR references this issue; incident #700 records the containment.LAST_UPDATED_BY:
controller / prgs-author (jcwalker3)
CTH: Controller Decision — additional independent reproduction evidence (from PR #703 review)
Status: additional_#698_evidence_recorded; not_pr_703_scope; formal_review_succeeded_final_report_validation_inconsistent
Next owner: author
Current blocker: unchanged process order — reimplementation still deferred until #699 and #697 land; this comment only adds independent evidence
Decision: Record the independent PR #703 review reproduction as additional Issue #698 evidence only. Do not expand PR #703 / Issue #702 implementation scope to fix final-report validator defects.
Proof: Independent leased PR #703 review handoffs — Issue #702 comment 11234; PR #703 comment 11239; formal REQUEST_CHANGES at head
889931d5532b32a46a181e03c1345946c7516aacfor #702 AC defects only.Next action: Keep #698 as diagnostic-lead reimplementation track; absorb the new reproduction points into the future #698 fix matrix; leave PR #703 authors to address only #702 F1–F6 scope.
Ready-to-paste prompt: see NEXT_PROMPT.
New independent reproduction (PR #703 review session)
Observed during the independent formal review of PR #703 (Issue #702), after the formal review workflow itself completed successfully:
Schema vs validator legacy-field contradiction
The loaded final-report schema prohibits legacy fields that the final-report validator still requires (same class of defect as the original #698 lead: required-field set out of sync with the canonical schema).
Misclassification of canonical reviewer lease release
The validator misclassifies canonical reviewer lease release as post-merge cleanup, producing incorrect validation demands for a pre-merge / post-review lease-release path.
Scope of impact on that review
The formal review itself succeeded (native formal verdict submitted and read back). Only final-report validation remained inconsistent with the completed review outcome — i.e. this is a reporting/validator consistency defect, not a failure of the PR #703 formal review API path.
Explicit non-scope
Do not treat this evidence as a reason to block or widen PR #703 beyond Issue #702 acceptance criteria.
Cross-links
Canonical Issue State
STATE:
diagnostic-lead-reimplementation-required; additional-independent-reproduction-from-pr-703-review
WHO_IS_NEXT:
author
NEXT_ACTION:
After #699 and #697 land, recreate the #698 fix from scratch including this additional evidence: schema/validator legacy-field consistency; graceful non-dict action_log handling; correct classification of canonical reviewer lease release (not post-merge cleanup). Do not fix these on PR #703.
NEXT_PROMPT:
WHAT_HAPPENED:
Controller recorded independent reproduction from the PR #703 formal review path: final-report schema/validator legacy-field mismatch and lease-release misclassification as post-merge cleanup, while the formal review verdict itself succeeded. Evidence attached to #698 only.
WHY:
Final-report validator defects must not be silently folded into the #702 recovery PR; they belong on the existing #698 diagnostic-lead reimplementation track.
RELATED_PRS:
PR #703 (source of independent observation; not the fix vehicle for this issue). No PR yet for #698.
BLOCKERS:
Process/rule blocker unchanged — #699 and #697 must land first per incident #700 order. This evidence does not change that order and does not block PR #703 remediation of #702 findings.
VALIDATION:
LAST_UPDATED_BY:
controller (jcwalker3 / prgs-author)
CTH: Controller Decision — #698 elevated to IMMEDIATE implementation priority (PR #703 re-review tooling stop)
Status: immediate_implementation_priority; independent_reproduction_at_c2fc268; blocks_fresh_pr_703_formal_verdict
Next owner: author
Current blocker: final-report validator/schema drift blocks formal review submission after successful leased validation
Decision: Issue #698 is now the immediate implementation priority. Prior ordering (#699 → #697 → #698) is superseded for this tooling-hold path because the live PR #703 re-review at head
c2fc2683b97e3ba5dc7eaf4ac9798af76bd08dfccompleted code validation under a proper lease and was stopped only bygitea_validate_review_final_report(grade=blocked). No formal verdict exists at the current head; no bypass was attempted.Proof: Issue #702 blocker comment 11277; PR #703 lease release comment 11282 (phase=released, session
48311-bc9067f4c07f); live review API: current_head_sha=c2fc2683b97e3ba5dc7eaf4ac9798af76bd08dfc, only prior REQUEST_CHANGES is at stale head889931d…(review_feedback_stale=true);gitea_assess_reviewer_pr_lease(703)active_lease=null / session_lease=null;gitea_list_workflow_leases(role=reviewer)count=0.Next action: Author implements #698 immediately in an issue-backed
branches/worktree; land through independent review + merge; prove repaired validator active in managed namespaces before any new PR #703 reviewer starts.Ready-to-paste prompt: see NEXT_PROMPT.
Exact independent reproduction (mandatory evidence matrix)
a7634e7b8689Pinned reviewed head,Scratch worktree used, and genericMutations) that the loaded schema forbidsCross-links
c2fc2683b97e3ba5dc7eaf4ac9798af76bd08dfc48311-bc9067f4c07f, phase=released)Explicit non-scope
This is not PR #703 / #702 product-scope work. Do not fold the validator fix into PR #703. Do not start a new PR #703 reviewer until this fix is merged and active.
Canonical Issue State
STATE:
immediate-implementation-priority; diagnostic-lead-plus-live-reproduction; blocks-pr-703-formal-re-review
WHO_IS_NEXT:
author
NEXT_ACTION:
Implement #698 now (schema/validator consistency + lease-release classification + non-dict action_log robustness); PR with Closes #698; independent review; merge; prove active in managed namespaces.
NEXT_PROMPT:
WHAT_HAPPENED:
Controller confirmed PR #703 re-review under lease completed validation at
c2fc268, then hit final-report validator grade=blocked; elevated #698 to immediate priority with exact reproduction from 11277.WHY:
Without the repaired validator, no formal current-head verdict can be recorded; continuing would require an unauthorized bypass.
RELATED_PRS:
PR #703 (tooling hold — not the fix vehicle). No #698 PR yet.
BLOCKERS:
None for starting #698 implementation. #698 itself blocks fresh PR #703 formal re-review until merged and active.
VALIDATION:
889931d)LAST_UPDATED_BY:
controller (jcwalker3 / prgs-author)
Issue claim heartbeat
[THREAD STATE LEDGER] Issue #698 — implementation recreated from scratch; PR #705 opened at head ee90a5e7a2b5; awaiting independent review
What is true now:
ee90a5e7a2b5f53f402d1f10e05b21005cf6eb6eand body "Closes #698"; this issue carriesstatus:pr-open; no review verdict has been recorded via the review API and no merge was attempted.branches/fix-issue-698-report-validator; the reverted contaminated edits were not restored or copied.ee90a5e— focused 27 passed (new regression file); companion suites for the touched modules 408 passed; full suite 2663 passed, 6 skipped, 161 subtests passed with-q -sin the project venv.What changed:
Pinned reviewed head,Scratch worktree used,Worktree path,Worktree dirty,Mutations,Next); canonical names required instead.performed=true, not gated); read-only diagnostics and pre-API rejections no longer imply mutations.Reviewed/Candidate head SHA: noneand no verdict/merge/validation owe no head proofs; phase-specific head proofs are demanded only after the corresponding phase begins; a report stating no head at all still fails closed.What is blocked:
Who/what acts next:
ee90a5e7a2b5f53f402d1f10e05b21005cf6eb6e, formal review against this issue's acceptance criteria including the comment 11246 evidence.Canonical Issue State
STATE:
pr-705-open-awaiting-independent-review
WHO_IS_NEXT:
reviewer
NEXT_ACTION:
Independent prgs-reviewer session: own worktree + own lease first, re-pin live head
ee90a5e7a2, formal review of PR #705 against Issue #698 acceptance criteria (original lead + comment 11246 evidence).NEXT_PROMPT:
WHAT_HAPPENED:
Author session claimed and locked #698, created the issue-backed worktree from master
2376567, recreated the validator/schema alignment fix from scratch with 27 regression tests, ran focused/companion/full validation (2663 passed, 6 skipped, 161 subtests), pushed branch fix/issue-698-report-validator-schema, and opened PR #705.WHY:
The prior implementation was contaminated and reverted; the canonical order gate recorded in comment 11089 was superseded by an explicit operator instruction to take #698 through the canonical workflow now, and the fix must land through an issue-backed branch with independent review.
RELATED_PRS:
PR #705 (implementation of this issue, open, head
ee90a5e, zero reviews). PR #703 remains the separate #702 remediation track at its own head; PR #704, #701, #696 untouched.BLOCKERS:
None — no blocker for the review path.
VALIDATION:
At
ee90a5ein branches/fix-issue-698-report-validator: focused 27 passed; companion suites 408 passed; full suite 2663 passed, 6 skipped, 161 subtests passed. Issue label transitioned to status:pr-open by the PR-create tool.LAST_UPDATED_BY:
author session 2026-07-13 (jcwalker3 / prgs-author)
CTH: Merger Handoff — #557 MCP merge of PR #705 not completed; UI merge required
Status: pr_705_open; mcp_merge_blocked_without_formal_approve; authorization_11322_valid
Next owner: user
Current blocker: Live
gitea_merge_prrequires formal APPROVED at current head; formal APPROVE path still blocked by unpatched final-report validator (this issue). #557 authorization 11322 permits operator UI merge.Decision: Mirror of PR #705 comment 11337. No merge mutation. Issue remains open until PR #705 lands.
Proof: PR #705 comment 11337; authorization 11322.
Next action: Operator UI-merges PR #705 at head
ee90a5e7a2, managed reconnect, controller activation proof.Ready-to-paste prompt: see PR #705 comment 11337 NEXT_PROMPT.
Canonical Issue State
STATE:
pr-705-open-awaiting-operator-ui-merge-557
WHO_IS_NEXT:
user
NEXT_ACTION:
UI-merge PR #705 per authorization 11322 while head is ee90a5e7a2b5f53f402d1f10e05b21005cf6eb6e; then activation proof.
NEXT_PROMPT:
WHAT_HAPPENED:
Merger preflight passed; MCP merge fail-closed without formal APPROVE; temporary lease released; no merge.
WHY:
Bootstrap deadlock: cannot formally approve the fix that unblocks formal approve on unpatched master; #557 UI merge is the landing path.
RELATED_PRS:
PR #705 (open). PR #703 remains held.
BLOCKERS:
Operator UI merge of #705.
VALIDATION:
See PR #705/11337.
LAST_UPDATED_BY:
merger (sysadmin / prgs-merger)
CTH: Residual defect still reproducible after PR #705 —
_rule_shared_canonical_comment_post_claimnested non-dict crashStatus: residual_#698_reproduced_on_master_cc3ad08; not_a_duplicate; do_not_bypass_validator
Next owner: author
Current blocker: none for filing; residual is residual of #698 action-log robustness (top-level fixed, nested not)
Decision: Update this issue with independent reproduction. Do not open a duplicate issue. Do not fold into PR #703 / #702. Do not bypass
gitea_validate_review_final_report.Proof: master
cc3ad0870aab9829cbe28cd869a283beeb37991d(Merge of PR #705); live call of_rule_shared_canonical_comment_post_claimon that tree.What PR #705 fixed (still true)
action_logentries are skipped via_iter_action_entries/sanitize_action_log.What remains broken (exact)
_rule_shared_canonical_comment_post_claimstill does:Truthiness of a non-empty
str/list/intprevents theor {}fallback, then.getraisesAttributeError.Reproduction matrix (master @
cc3ad08, wall time ~2026-07-13T23:13Z)None/[]/["not-a-dict"][{"canonical_comment_validation": {"allowed": False}}][{"canonical_comment_validation": "bad"}]AttributeError: 'str' object has no attribute 'get'[{"result": "bad"}][{"canonical_comment_validation": ["x"]}]list[{"result": 1}]int[{"canonical_comment_validation": None}]None or {})Crash occurs even when the report text does not claim a comment was posted (rule entry before claim check).
Scope / non-scope
_rule_shared_canonical_comment_post_claimCanonical Issue State
STATE:
closed_by_705_but_residual_nested_action_log_crash_open_for_followup
WHO_IS_NEXT:
author
NEXT_ACTION:
Author follow-up (issue-backed worktree): harden nested
canonical_comment_validation/resultreads withisinstance(..., dict)(or equivalent helper); regression cases for str/list/int nested values; land via independent review. Do not reopen product scope of #702/#703 for this.NEXT_PROMPT:
WHAT_HAPPENED:
Controller/reconciler reassessing PR #703 lease 11370 independently reproduced residual #698 crash on merged master after #705.
WHY:
#705 hardened top-level action_log iteration but left nested field access unsafe; same defect class as original lead.
RELATED_PRS:
PR #705 merged (partial #698). PR #703 not the fix vehicle.
BLOCKERS:
None for author start. Residual may still fail-closed/crash some final-report paths if nested garbage appears; formal review must still not bypass the validator.
VALIDATION:
cc3ad0870aLAST_UPDATED_BY:
controller/reconciler (sysadmin / prgs-reconciler)