maint: clear dep cycles, fix check-perf, 100% doc coverage, reduce complexity (62→7)#700
Merged
Conversation
…e, reduce complexity Maintenance sweep follow-up: - dep-violations: break 2 circular deps by extracting import-free type contracts (drift/findings/types.ts, craft/llm/contracts.ts). No runtime change. - perf-check: load harness config so check-perf resolves configured entryPoints on monorepos (was failing "Could not resolve entry points"). - doc-drift: add docs/reference/*.md indices so previously-undocumented source files are referenced (coverage 72% -> 100%). - arch-violations: reduce cyclomatic complexity / nesting / length across 15 files (62 -> 42 findings). Behavior-preserving helper extraction.
Behavior-preserving helper extraction across cli/core/graph/orchestrator/ dashboard. With the earlier batch, arch-violations drops 62 -> 7 (remaining: 5 warn-level function splits + 2 large baseline functions). Typecheck passes.
… internal refactors
Extract helpers in linear.ts (create/update/fetchHistory/featureFromIssue), task-runner parseStatusObjectLine, and webhook-handler handleRequest. Cleared 4 of 5 warn-level violations; createWebhookServer also dropped 23→18. Remaining: 1 anonymous if (cc12) + 2 large baseline functions. Typecheck + targeted tests green.
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.
On-demand maintenance sweep follow-up (via
harness maintenance run). Four overdue findings addressed.Summary
dep-violationsperf-checkdoc-driftarch-violationsWhat changed
drift/findings/types.ts,craft/llm/contracts.ts). No runtime change.runCheckPerfnever loaded the harness config, so it passed noentryPointsto the analyzer and fell back to root resolution (impossible on a monorepo). Now loads config and threadsperformance.entryPoints(→entropy.entryPointsfallback), with graceful no-op for non-harness dirs.docs/reference/*.mdindices linking the previously-undocumented source files (the coverage check is link-based, not doc-comment-based). Angle brackets escaped for the VitePress build.manager.tsISO,webhook-handlercreateWebhookServer) that resisted safe mechanical reduction.Validation
pnpm -r typecheck— passes (all 10 packages)pnpm -r test— ~38,900 tests pass, 0 failuresdep-violations/doc-drift/check-perfre-checked against the local buildReleases
.changeset:@harness-engineering/clipatch (thecheck-perf+ dep-cycle fixes are user-facing). The 6 internally-refactored packages use a no-release marker..prettierignore— prettier collapses its---\n\n---frontmatter to---\n---, whichcheck-changesets.mjsrejects (latent repo bug; mirrors the existingagents/commands/**exclusion).🤖 Generated with Claude Code