Skip to content

docs(cli): document tool-install smoke test and worker bundling#109

Merged
Reefact merged 1 commit into
mainfrom
claude/gendoc-worker-package-23x67i
Jul 13, 2026
Merged

docs(cli): document tool-install smoke test and worker bundling#109
Reefact merged 1 commit into
mainfrom
claude/gendoc-worker-package-23x67i

Conversation

@Reefact

@Reefact Reefact commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

This PR documents the manual smoke test required to validate that the fce .NET tool correctly bundles and executes its GenDoc worker process. It also adds an automated assertion in pack.sh to catch silent failures where the worker file is missing from the packaged tool, and clarifies the packaging mechanism in code comments.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Analyzer / diagnostic change
  • Tests
  • Documentation
  • Build / CI / tooling

Changes

  • maintainers/ReleaseDryRun.en.md and maintainers/ReleaseDryRun.fr.md: Added comprehensive section "The tool-install smoke test (the fce worker)" documenting:

    • Why dry runs cannot validate the installed tool works (the worker is spawned as a child process)
    • Step-by-step instructions to manually test tool installation and worker execution
    • Expected outcomes (non-empty catalog, no "worker could not be located" errors)
    • Naming traps to avoid (package ID vs. command name)
    • Reference to FirstClassErrors.Usage as a convenient test target
  • FirstClassErrors.Cli/FirstClassErrors.Cli.csproj: Expanded comments to explain:

    • Why the worker is not a managed dependency (ReferenceOutputAssembly=false)
    • How _PublishDocumentationWorker target ensures the worker reaches the package
    • Why dotnet build and dotnet publish alone cannot validate worker bundling
    • Reference to the manual smoke test as the real validation gate
  • tools/packaging/pack.sh: Added automated assertion that:

    • Checks for the presence of FirstClassErrors.GenDoc.Worker.dll in the packaged tool
    • Fails loudly if the worker is missing, preventing silent field failures
    • Only runs for the cli scope
    • Includes detailed comments explaining why this check is necessary

Testing

  • dotnet build FirstClassErrors.sln — verified no build errors
  • dotnet test FirstClassErrors.sln — 609 passed, 0 failed, 0 skipped
  • Manual tool-install smoke test — installed the packed fce tool globally and ran fce generate against FirstClassErrors.Usage (both --assemblies and --solution modes): non-empty catalog (465 lines, 10 documented errors), zero "documentation worker could not be located" errors
  • pack.sh … cli worker-bundling guard verified in both directions — passes when the worker ships, and fails (exit 1) when the packaging target is temporarily disabled

Documentation

  • Maintainers documentation updated (ReleaseDryRun guides in English and French)
  • Code comments clarified in .csproj and pack.sh
  • French translation kept in sync with English documentation

Related issues

None

https://claude.ai/code/session_0132ctxy3scPRq5mjAS8Xjeu

`fce generate` spawns FirstClassErrors.GenDoc.Worker in a child process and
resolves it next to the installed executable (AppContext.BaseDirectory), so the
tool only works if the worker and its closure travel inside the .nupkg under
tools/<tfm>/any. That bundling already happens -- PackAsTool packs the CLI's
publish output and _PublishDocumentationWorker drops the worker there -- but
nothing enforced it: neither `dotnet build` nor `dotnet publish` exercises the
.nupkg content, so a regression would pass every local check and only surface as
"documentation worker could not be located" on a user's first run.

Add a pack-time assertion in tools/packaging/pack.sh (cli scope) that fails the
pack when FirstClassErrors.GenDoc.Worker.dll is absent from tools/<tfm>/any, in
the same spirit as the existing SBOM check. Verified it bites by temporarily
disabling the packaging target: the pack then exits non-zero.

Replace the misleading "validate with dotnet build and dotnet publish" comment
in the CLI .csproj with a pointer to that guard and to a new manual tool-install
smoke test, documented in maintainers/ReleaseDryRun (EN + FR): install the
packed tool and run `fce generate`, the only oracle that proves the packaged
closure actually runs. Checked once here against FirstClassErrors.Usage -- a
non-empty catalog, no worker-not-located error.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0132ctxy3scPRq5mjAS8Xjeu
@Reefact Reefact merged commit 9726bbe into main Jul 13, 2026
11 checks passed
@Reefact Reefact deleted the claude/gendoc-worker-package-23x67i branch July 13, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants