Files
whetrails/handoff/next-steps.md
bill ab1f29269e
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled
Update handoff docs for completed engine layer
Mark engine as done in overview and build order. Update next-steps to
focus on test gap analysis. Add engine file map, data flow, and dev
setup quirks (Zeitwerk conflict, engine routes conflict) to architecture.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 20:14:19 -06:00

45 lines
1.7 KiB
Markdown

# Next Steps
## Immediate: Test Gap Analysis
The engine is done. The next layer uses the extracted chain as input to find uncovered
callbacks and validators.
### How it works
1. Run the host app's test suite with SimpleCov to get line coverage data
2. For each `CallbackEntry` in the `ModelChain`, check whether `source_file:source_line`
is covered in the SimpleCov report
3. For each `ValidatorEntry`, check whether the validation path is exercised
4. Report: "these 3 callbacks have no test coverage"
The `ModelChain` data structure is already the right shape — each `CallbackEntry` has
`source_file` and `source_line`, ready to cross-reference against SimpleCov output.
### Integration point
Surface this in the engine UI: add a "Coverage" column to each callback row, showing
green/red/unknown based on whether SimpleCov data is available and whether the line
is covered.
SimpleCov writes JSON to `coverage/.resultset.json` after a test run. Parse that file
directly — no need to instrument the test suite beyond what SimpleCov already does.
## After gap analysis: distribution
- Publish to RubyGems.org
- The gem should be dev/test-only (add under `group :development`)
- Pricing model TBD — could be open source with a paid cloud version, or MIT with
a commercial license for teams
## Environment notes
- Ruby 3.3.6 installed via rbenv (`~/.rbenv/versions/3.3.6`)
- rbenv init added to `~/.zshrc`
- Rails 8.1.3
- Dev database: SQLite at `storage/development.sqlite3`
- Gitea running in Docker on localhost:3000 (container name: `gitea`)
- Gitea API token for `bill`: `c2948775b80bcaa0ba65c6359658d0d48c340c4e`
- Dev server runs on port 3100 (`bin/rails server -p 3100`)
- Visit `http://localhost:3100/whetrails` to see the engine UI