Skip to content

Commit b0bebf2

Browse files
n-rodriguezclaude
andcommitted
Document the audit findings left unfixed
- CLAUDE.md: record why Processor caches no glob result and why the Dockerfile copies the whole git history, so neither reads as an oversight Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 9db37d1 commit b0bebf2

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎CLAUDE.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,10 @@ Specs are fixture-driven rather than assertion-heavy: a template or input YAML u
7272
`spec_helper.cr` provides `create_renderer(doc_root:, entrypoint:)`, `load_yaml(file)`, `with_doc_root(files) { |root| }` and `build_stack(root, host)` for throwaway trees, `with_config(yaml) { }`, and `call_request(request)` for HTTP specs.
7373

7474
`call_request` runs the request through Kemal's **exception handler chained to the route handler**, not the route handler alone. That matters: Kemal turns a response status having a registered `error` handler into a `CustomException`, so a route exercised through `RouteHandler` alone returns a body no real client ever receives. An HTTP spec that skips the exception handler will pass while production answers an HTML error page.
75+
76+
## Deliberately not done
77+
78+
Two things a reader may expect to find, and the reason they are absent:
79+
80+
- **No cache of the `Dir[]` glob results in `Processor`.** Invalidating it would need a directory mtime, which is not a sound key for the nested globs the stack config files use (`{{ minion_id }}/*.yml`). A stale file list after a deploy means a silently truncated pillar — the exact failure mode the error handling above exists to prevent. The template cache in `Context` already captures the measured cost.
81+
- **The Dockerfile copies the whole `.git/`.** Trimming it to the refs breaks `Stacker::VERSION` and `Stacker::GIT_REF`, which shell out to `shards version` and `git log` at compile time and need the objects. Shrinking the build context is not worth breaking the release build.

0 commit comments

Comments
 (0)