[{"data":1,"prerenderedAt":533},["ShallowReactive",2],{"figure-telemetry":3,"menu-audits":6,"menu-decisions":7,"menu-projects":23,"menu-workflows":99,"decision-0003-coverage-report-merge":116},{"value":4,"alert":5},"18%",false,[],[8,11,14,17,20],{"label":9,"to":10},"0041 The visitor view becomes its own app, and the portal reads only as a developer platform","\u002Fdecisions\u002F0041-personal-site-splits-from-developer-portal",{"label":12,"to":13},"0040 Visitors land on the front page and toggle to the developer view","\u002Fdecisions\u002F0040-developer-portal-visitor-structure",{"label":15,"to":16},"0039 The developer portal is redesigned for visitors, from a twelve-site benchmark","\u002Fdecisions\u002F0039-developer-portal-benchmark",{"label":18,"to":19},"0038 Marina Roustan's discovery","\u002Fdecisions\u002F0038-marina-roustan-discovery",{"label":21,"to":22},"0013 New linters: the robustness gap is tsconfig and enforcement, not plugins","\u002Fdecisions\u002F0013-linter-coverage",[24,29,60,83],{"labelKey":25,"icon":26,"to":27,"badge":28},"app.menu.allProjects","i-lucide-layers","\u002Fprojects","11",{"labelKey":30,"icon":31,"to":32,"badge":33,"children":34},"app.menu.kinds.apps","i-lucide-app-window","\u002Fprojects?kind=apps","5",[35,40,45,50,55],{"label":36,"icon":31,"to":37,"badge":38,"coverage":39},"developer-portal","\u002Fprojects\u002Fdeveloper-portal","94%",94.37,{"label":41,"icon":31,"to":42,"badge":43,"coverage":44},"huella-legal","\u002Fprojects\u002Fhuella-legal","97%",97.48,{"label":46,"icon":31,"to":47,"badge":48,"coverage":49},"marina-roustan","\u002Fprojects\u002Fmarina-roustan","100%",100,{"label":51,"icon":31,"to":52,"badge":53,"coverage":54},"portfolio","\u002Fprojects\u002Fportfolio","91%",91.31,{"label":56,"icon":31,"to":57,"badge":58,"coverage":59},"wp-editor","\u002Fprojects\u002Fwp-editor","50%",49.89,{"labelKey":61,"icon":62,"to":63,"badge":64,"children":65},"app.menu.kinds.packages","i-lucide-package","\u002Fprojects?kind=packages","4",[66,71,75,80],{"label":67,"icon":62,"to":68,"badge":69,"coverage":70},"configs","\u002Fprojects\u002Fconfigs","76%",75.7,{"label":72,"icon":62,"to":73,"badge":48,"coverage":74},"content","\u002Fprojects\u002Fcontent",99.58,{"label":76,"icon":62,"to":77,"badge":78,"coverage":79},"i18n","\u002Fprojects\u002Fi18n","99%",99.08,{"label":81,"icon":62,"to":82,"badge":48,"coverage":49},"observability","\u002Fprojects\u002Fobservability",{"labelKey":84,"icon":85,"to":86,"badge":87,"children":88},"app.menu.kinds.infrastructure","i-lucide-server","\u002Fprojects?kind=infrastructure","2",[89,94],{"label":90,"icon":85,"to":91,"badge":92,"coverage":93},"scripts","\u002Fprojects\u002Fscripts","79%",78.6,{"label":95,"icon":85,"to":96,"badge":97,"coverage":98},"translations","\u002Fprojects\u002Ftranslations","93%",93.33,[100,103,106,109,112],{"label":101,"to":102},"Huella Legal","\u002Fworkflows\u002Fhuella-legal",{"label":104,"to":105},"Marina Roustan","\u002Fworkflows\u002Fmarina-roustan",{"label":107,"to":108},"Developer portal front door","\u002Fworkflows\u002Fdeveloper-portal-front-door",{"label":110,"to":111},"Huella Legal editorial","\u002Fworkflows\u002Fhuella-legal-editorial",{"labelKey":113,"icon":114,"to":115},"app.menu.newProject","i-lucide-plus","\u002Fworkflows\u002Fnew",{"id":117,"title":118,"body":119,"description":514,"extension":522,"kind":523,"meta":524,"navigation":528,"path":529,"seo":530,"stem":531,"url":523,"verdict":523,"__hash__":532},"docs\u002Fdocs\u002Fdecisions\u002F0003-coverage-report-merge.md","🧭 One coverage report, merged from the per-project runs",{"type":120,"value":121,"toc":513},"minimark",[122,126,131,167,189,193,203,311,325,329,438,442,449,467,479,482,486],[123,124,118],"h1",{"id":125},"one-coverage-report-merged-from-the-per-project-runs",[127,128,130],"h2",{"id":129},"context","Context",[132,133,134,135,139,140,143,144,147,148,150,151,154,155,162,163,166],"p",{},"Every project's ",[136,137,138],"code",{},"test:coverage"," writes its own ",[136,141,142],{},"coverage\u002F"," directory — seven of them today — so\nreading coverage for the workspace means opening seven ",[136,145,146],{},"index.html"," files by hand. Nx caches and\nrestores those directories (",[136,149,138],{}," declares ",[136,152,153],{},"{projectRoot}\u002Fcoverage"," as its output in\n",[156,157,159],"a",{"href":158},"repo:nx.json",[136,160,161],{},"nx.json",") but has no aggregation step of its own: there is no ",[136,164,165],{},"nx coverage"," and\nno first-party merge, and the cost of the manual read grows with every project added.",[132,168,169,170,176,177,180,181,184,185,188],{},"What the workspace does already have is the input a merge needs. The shared preset in\n",[156,171,173],{"href":172},"repo:packages\u002Fconfigs\u002Fsrc\u002Fvitest\u002Fnode.ts",[136,174,175],{},"vitest\u002Fnode.ts"," emits ",[136,178,179],{},"json"," and ",[136,182,183],{},"lcov"," from every\nproject, so seven ",[136,186,187],{},"coverage-final.json"," files are sitting on disk with nothing consuming them.",[127,190,192],{"id":191},"result","Result",[132,194,195,196,202],{},"Per-project runs stay as they are, and a merge step is added to\n",[156,197,199],{"href":198},"\u002Fwiki\u002Finfrastructure\u002Fscripts\u002Freadme",[136,200,201],{},"@joinery\u002Fscripts",", built on Istanbul's libraries\ndirectly. Five points make up the call:",[204,205,206,236,258,274,294],"ol",{},[207,208,209,213,214,217,218,221,222,225,226,229,230,232,233,235],"li",{},[210,211,212],"strong",{},"Nx is the source of truth for what to merge."," ",[136,215,216],{},"nx show projects --with-target test:coverage","\nnames the projects; ",[136,219,220],{},"nx show project \u003Cname>"," gives each one's ",[136,223,224],{},"root"," and its target's declared\n",[136,227,228],{},"outputs",". So the script hardcodes neither a glob nor the string ",[136,231,142],{}," — an eighth project\nis picked up for free, and moving the output directory in ",[136,234,161],{}," carries the script with it.",[207,237,238,241,242,244,245,248,249,253,254,257],{},[210,239,240],{},"It refuses to render a partial report."," If Nx names seven projects and six have a\n",[136,243,187],{},", the script errors naming the seventh rather than rendering a report that\nis quietly missing a project. This is the same argument the ",[136,246,247],{},"include"," comment in\n",[156,250,251],{"href":172},[136,252,175],{}," already makes at file level: an\nabsent file has to count as absent, not vanish. It is also what makes running the merge after an\n",[136,255,256],{},"affected"," run fail loudly instead of lying.",[207,259,260,270,271,273],{},[210,261,262,263,266,267,269],{},"It runs over ",[136,264,265],{},"run-many",", never ",[136,268,256],{},"."," A merged report built from affected projects is\nthe same lie from the other direction — the projects that didn't run are simply absent. The\naffected ",[136,272,138],{}," stays as it is for the fast loop.",[207,275,276,213,279,282,283,285,286,289,290,293],{},[210,277,278],{},"It merges only; the run is chained in the root script.",[136,280,281],{},"nx run-many -t test:coverage && node …"," keeps ",[136,284,265],{}," visible and tweakable in ",[136,287,288],{},"package.json"," instead of buried in a ",[136,291,292],{},"spawn",",\nand it leaves the script a pure function of the files on disk — which is what makes its\ndiscovery and validation testable at all.",[207,295,296,299,300,306,307,310],{},[210,297,298],{},"No thresholds and no single workspace percentage."," One number mixing\n",[156,301,303],{"href":302},"\u002Fwiki\u002Fapps\u002Fhuella-legal\u002Freadme",[136,304,305],{},"apps\u002Fhuella-legal"," with\n",[136,308,309],{},"packages\u002Fui"," isn't actionable; per-project thresholds belong in\neach project's vitest config, where they can differ. The browsable merged HTML is the whole\ndeliverable.",[132,312,313,314,316,317,320,321,324],{},"Two facts checked during the decision carry the design. Keys in ",[136,315,187],{}," are ",[210,318,319],{},"absolute\npaths",", so nothing collides across projects and the merged HTML tree comes out rooted at the\nworkspace with a folder per project — the desired grouping, for free. That also makes the inverse a\nreal hazard, so the script asserts it: were a project ever to emit relative paths, two ",[136,322,323],{},"src\u002Findex.ts","\nentries would silently merge into one wrong file.",[127,326,328],{"id":327},"options-considered","Options considered",[330,331,332,345],"table",{},[333,334,335],"thead",{},[336,337,338,342],"tr",{},[339,340,341],"th",{},"Option",[339,343,344],{},"Why not",[346,347,348,372,383,397,408,428],"tbody",{},[336,349,350,358],{},[351,352,353,354,357],"td",{},"A root Vitest ",[136,355,356],{},"projects"," config",[351,359,360,361,363,364,367,368,371],{},"Produces one native report with no merge logic at all, but tests then bypass Nx entirely — no per-project cache, no ",[136,362,256],{},", no ",[136,365,366],{},"dependsOn",". ",[136,369,370],{},"pnpm test"," running affected-only is a stated invariant of this repo",[336,373,374,377],{},[351,375,376],{},"Hosted — Codecov, Coveralls, SonarCloud",[351,378,379,380,382],{},"Merges the ",[136,381,183],{}," uploads server-side and adds per-PR diff coverage, but it's a vendor plus a token, and it does nothing for the local loop this decision is about. CI runs no coverage today, so it's a different job — and an orthogonal one, still open",[336,384,385,394],{},[351,386,387,390,391],{},[136,388,389],{},"nyc merge"," + ",[136,392,393],{},"nyc report",[351,395,396],{},"The standard answer, and literally the same Istanbul code — but reached through a full CLI whose transitive tree is far larger than the three libraries it would be pulled in to call",[336,398,399,405],{},[351,400,401,404],{},[136,402,403],{},"vitest --merge-reports"," (blob reporter)",[351,406,407],{},"Built for sharding a single config across machines; here Nx spawns a process per project against two different presets (node and vue), which is not the shape it expects",[336,409,410,417],{},[351,411,412,413,416],{},"Concatenating the ",[136,414,415],{},"lcov.info"," files",[351,418,419,420,423,424,427],{},"Zero npm dependencies to merge, but rendering HTML from lcov needs ",[136,421,422],{},"genhtml"," from system perl — trading an install ",[136,425,426],{},"pnpm i"," handles for one it can't",[336,429,430,435],{},[351,431,432],{},[136,433,434],{},"monocart-coverage-reports",[351,436,437],{},"Nicer HTML rendered off raw v8 output, but it's novelty against reports that are already in Istanbul's format",[127,439,441],{"id":440},"consequences","Consequences",[132,443,444,445,448],{},"Unlocks a single ",[136,446,447],{},"pnpm coverage"," producing one browsable report, and it stays correct as projects\nare added because Nx, not a glob, decides what goes into it.",[132,450,451,452,455,456,459,460,180,463,466],{},"The cost is dependencies: ",[136,453,454],{},"infrastructure\u002Fscripts"," goes from one runtime dependency to four\n(",[136,457,458],{},"istanbul-lib-coverage"," for the merge, ",[136,461,462],{},"istanbul-lib-report",[136,464,465],{},"istanbul-reports"," for the HTML).\nThat deserves the scrutiny CLAUDE.md asks for, and the answer is narrow — the merge itself is about\nfive lines, and the three libraries buy the HTML renderer. Writing that renderer is the actual\n\"build your own tooling\" trap this decision set out to avoid.",[132,468,469,470,472,473,475,476,478],{},"Forecloses nothing. A hosted service remains available and complementary, because every project\nalready emits ",[136,471,183],{}," whether or not anything uploads it. Revisit if CI starts gating coverage or\nwanting per-PR diff coverage — that is the hosted-service conversation, and it replaces none of the\nabove — or if the per-project vitest presets ever converge enough that a root ",[136,474,356],{}," config\ncould keep ",[136,477,256],{}," intact.",[132,480,481],{},"Implementation is a follow-up issue rather than part of this record; none has been filed yet.",[127,483,485],{"id":484},"confirmation","Confirmation",[132,487,488,491,492,495,496,498,499,505,506,512],{},[136,489,490],{},"pnpm test:coverage"," (root) runs ",[136,493,494],{},"nx run-many -t test:coverage"," then the merge, and errors naming\nany project missing a ",[136,497,187],{}," instead of rendering a partial report — pinned by\n",[156,500,502],{"href":501},"repo:infrastructure\u002Fscripts\u002Fsrc\u002Fcoverage-report\u002Fdomain\u002Fdiscover.ts",[136,503,504],{},"coverage-report\u002Fdomain\u002Fdiscover.ts","\nand\n",[156,507,509],{"href":508},"repo:infrastructure\u002Fscripts\u002Fsrc\u002Fcoverage-report\u002Fdomain\u002Fmerge.ts",[136,510,511],{},"coverage-report\u002Fdomain\u002Fmerge.ts","'s\nspecs, which is also where the absolute-path assumption is checked.",{"title":514,"searchDepth":515,"depth":515,"links":516},"",2,[517,518,519,520,521],{"id":129,"depth":515,"text":130},{"id":191,"depth":515,"text":192},{"id":327,"depth":515,"text":328},{"id":440,"depth":515,"text":441},{"id":484,"depth":515,"text":485},"md",null,{"issue":525,"status":526,"decision":527},44,"implemented","accepted",true,"\u002Fdocs\u002Fdecisions\u002F0003-coverage-report-merge",{"title":118,"description":514},"docs\u002Fdecisions\u002F0003-coverage-report-merge","dO5x4yhU_UcTbHeHOgR5HriWUBpit72pSeWN9qMjfNU",1795478398388]