From 590203a2933ac25f9f2c2faf80226b5106f895fa Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sat, 22 Aug 2026 15:07:23 -0400 Subject: [PATCH] refactor(tests+frontend): one http_sink helper for the hook tests; apiErrorMessage replaces ten hand-rolled error-body parses; `type X,` import specifiers are not definitions (#2904, milestone 299 step 6) tests/helpers.http_sink replaces three module-local _Sink handlers (the write-path tests and the after-write test). ProjectView + SettingsView parsed `(e as {body?:{error?}}).body?.error || fallback` by hand ten times beside the apiErrorMessage canon (#2853) - all ten now call it. The extractor (server + the hook awk mirror) no longer reads `import { type Foo }` as a definition of Foo - that was the last "identical body" sym family. Co-Authored-By: Claude Fable 5 --- frontend/src/views/ProjectView.vue | 5 +- frontend/src/views/SettingsView.vue | 27 +++------ plugin/hooks/scribe_defs.sh | 7 +++ src/scribe/services/coverage.py | 6 ++ tests/helpers.py | 37 ++++++++++++ tests/test_after_write_hook.py | 94 +++++++++++------------------ tests/test_pattern_coverage.py | 15 +++++ tests/test_write_path_trigger.py | 79 ++++++++---------------- 8 files changed, 137 insertions(+), 133 deletions(-) diff --git a/frontend/src/views/ProjectView.vue b/frontend/src/views/ProjectView.vue index 61b3a12..ed5cc02 100644 --- a/frontend/src/views/ProjectView.vue +++ b/frontend/src/views/ProjectView.vue @@ -1,7 +1,7 @@