[GRV-26]: Establish attribution catalog and repair boundary guard#44
Merged
github-actions[bot] merged 1 commit intoJun 5, 2026
Conversation
Repair the llm-cost-attribution architecture boundary guard so its config reflects the package after the estimation extraction, and complete the repo-root attribution use-case catalog as the canonical source of truth. Boundary guard (scripts/check-boundary.mjs): - Drop the dead `src/enrich.mjs` core entry and the phantom `src/linear-estimate-source.mjs` adapter entry. Both modules moved to llm-cost-estimation; existsSync silently skipped them, so the guard claimed to protect/classify modules that no longer exist here. - Replace stale remediation text that still pointed at the moved LinearEstimateSource with port-neutral attribution guidance. Regression guard (test/boundary.test.mjs): - Add config-integrity tests asserting every configured core/adapter path exists, so dead or phantom entries can't silently recur. - Exercise the core-imports-adapter rule against a real adapter (attribution-adapters.mjs) instead of the removed linear adapter. Attribution catalog (docs/architecture/use-case-catalog.md): - Add a canonical intro, the inward dependency rule, and the boundary guard enforcement linkage. - Catalog the two remaining public use cases (CreateAttributionWorkflow, ListKnownIssues) so the catalog covers the full attribution surface. Co-authored-by: riddim-developer-bot <developer-bot@riddimsoftware.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
Part of the llm-cost architecture contracts Project. Two deliverables, both scoped to the
llm-cost-attributionpackage (per this issue's title +llm-cost-attributionlabel):Repair boundary guard —
packages/llm-cost-attribution/scripts/check-boundary.mjsThe boundary config carried two dead references to modules that were extracted to
llm-cost-estimation(in GRV-2 / the estimation split) but never removed here:src/enrich.mjsincoreModulessrc/linear-estimate-source.mjsinadapterModulesNeither file exists in this package, so
existsSyncsilently skipped them — the guard claimed to protect/classify modules it can no longer see. Repaired by:LinearEstimateSourcewith port-neutral attribution guidance (SessionSource/IssueMatcher/UsageRecordSource/UsageRecordSink). The defensive@linear/https/fs/child_processforbidden-package rules are kept.To repair the class of bug (not just the instance),
test/boundary.test.mjsnow:coreModules/adapterModulespath exists on disk, so dead or phantom entries fail CI instead of silently passing.attribution-adapters.mjs) instead of the removed Linear adapter.Establish attribution catalog —
docs/architecture/use-case-catalog.mdVerification
npm test(llm-cost-attribution): 200 pass / 0 fail (was 198; +2 new config-integrity tests).node scripts/check-boundary.mjs: Boundary check passed.node --checkon changedscripts/check-boundary.mjsandtest/boundary.test.mjs: ✓.architecture-boundary.check.mjs(runs the repaired guard): ✓attribution-ports.test.mjs: ✓llm-cost-attribution.origin/main(includes [GRV-27]: Resolve estimation API and catalog drift #43 / GRV-27).Out of scope (observed, not fixed here)
The non-required project-acceptance gate still reports one finding, in the separate
llm-cost-estimationpackage, left by the just-merged GRV-27 (#43):packages/llm-cost-estimation/docs/use-cases.md:67marks the now-implementedforecastProjectCostas planned/stubbed. That is estimation-catalog territory (GRV-27's rollout), not this attribution issue — flagged here as a breadcrumb for a follow-up rather than mixing packages in one PR.pr-build(the required gate) excludes the project-acceptance directory, so this does not block merge.