fix: surface swallowed wiki and run failures#54
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
fix: surface swallowed wiki and run failures#54devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Report unreadable topics.yaml through validate, classify index refresh failures, and stop silently dropping the failed-run transition. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four places where an error disappeared instead of reaching the operator:
topics.yamlparse errors vanished.load_topics_yamlreturned()for a malformed or unreadable file, so every topic silently dropped out of the index whilevalidatereported the wiki as fine. Reads stay lenient (existing contract), but the reader now carries the error:HealthService.validateturns a non-Noneerrorinto atopics_fileissue.page_routes. Route collisions now raisePageRouteCollision(ValidationFailed); anything elseensure_freshraises (bad page paths, frontmatter rewrites) is categorisedindex_sourcesinstead of being mislabelled.OperationRunner.failwrapped both the error event and theruns.finishtransition insuppress(Exception). The event write stays best-effort; the terminal transition moved tofinish_failed_run, which raisesExecutionFailednaming the run, the original failure, and the bookkeeping error.file_hashreturnedsha256(b"")onOSError, so an unreadabletopics.yamlproduced the same source signature as an absent one andrefreshcould report itself fresh. Unreadable files now hash distinctly.Why
These are the cases in the audit where a failure changed observable product state (topics dropped from the index, a run stuck in
running, an index reporting itself fresh) with nothing surfaced to the user. The other broad handlers reviewed — telemetry capture, transcript/frontmatter parsing,webbrowser.Error, psutil teardown — are deliberate and documented, and are left alone.Verification
New tests:
test_validate_reports_unreadable_topics_file,test_operation_failure_surfaces_unrecorded_terminal_transition,test_unreadable_source_file_does_not_hash_like_a_missing_one. The existingtest_malformed_topics_yaml_does_not_break_readsandtest_operation_failure_records_terminal_state_when_event_write_failsstill pass unchanged, which is the point: lenient reads and best-effort event logging are preserved.Docs and wiki
almanac/wiki updated:architecture/wiki/health-and-validation,architecture/wiki/topics-dag,architecture/lifecycle/operation-runner.Notes for reviewers
workflows/operations/failure.pyis a new file only becauseworkflows/operations/service.pyis capped at 250 lines bytest_page_writing_workflow_services_stay_small; the terminal-transition write is a coherent responsibility to own next tocommit.pyandharness.py. The error-event write intentionally stayed inservice.pyso the existing monkeypatch onoperations.recordkeeps exercising that path.index_sourcesis a new validation category string, visible invalidate --jsonoutput for wikis that fail index refresh for non-collision reasons.Link to Devin session: https://app.devin.ai/sessions/ce558f6ddad94f819d9095b56d3d296b
Requested by: @rohans0509