refactor(constants): complete error_constants adoption (#3550)#3559
Merged
mrveiss merged 1 commit intoDev_new_guifrom Apr 6, 2026
Merged
refactor(constants): complete error_constants adoption (#3550)#3559mrveiss merged 1 commit intoDev_new_guifrom
mrveiss merged 1 commit intoDev_new_guifrom
Conversation
…ng sites, remove dead constants (#3550) - Wire ERR_SESSION_NOT_FOUND in services/autoresearch/routes.py - Wire ERR_TEMPLATE_NOT_FOUND in api/knowledge_metadata.py - Remove ERR_NOT_FOUND and ERR_FAILED_TO (zero call sites, too varied for the template pattern — dead constants violate project rules) - Remove ERR_NOT_FOUND and ERR_FAILED_TO from constants/__init__.py __all__ - Update api_endpoint_migrations_test.py inspect.getsource assertion for scheduler.schedule_template_workflow to check ERR_TEMPLATE_NOT_FOUND Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Completes the error_constants adoption started in PR #3539, addressing all gaps found in the post-merge code review.
Changes
services/autoresearch/routes.py— wireERR_SESSION_NOT_FOUND(1 site)api/knowledge_metadata.py— wireERR_TEMPLATE_NOT_FOUND(1 site)constants/error_constants.py— removeERR_NOT_FOUNDandERR_FAILED_TO(zero call sites; the "Failed to {operation}" pattern is too varied across 30+ sites to adopt uniformly — dead constants violate project rules)constants/__init__.py— removeERR_NOT_FOUNDandERR_FAILED_TOfrom import block and__all__api/api_endpoint_migrations_test.py— updateinspect.getsource()assertion forschedule_template_workflowto check forERR_TEMPLATE_NOT_FOUNDinstead of the literal stringCloses #3550