Skip to content

Feat/v1 sweep - #2

Merged
roobie merged 34 commits into
mainfrom
feat/v1-sweep
Mar 8, 2026
Merged

Feat/v1 sweep#2
roobie merged 34 commits into
mainfrom
feat/v1-sweep

Conversation

@roobie

@roobie roobie commented Mar 8, 2026

Copy link
Copy Markdown
Owner

No description provided.

roobie and others added 30 commits March 8, 2026 02:20
…Corrupt error

- Vendor Mozilla CA bundle (144 certs) from curl.se at certs/cacert.pem
- Add certs/SOURCE provenance metadata
- Add scripts/update-ca-bundle.sh helper to refresh CA bundle
- Update bssl_ctx_new_from_pem signature with cert_count_out parameter
- Add cert counting in PEM parse loop and ERR_clear_error after loop
- Add FetchError.CaBundleCorrupt with exit code 77 and descriptive message

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add mod.addAnonymousImport for cacert_pem on library module
- Add "certs" to .paths in build.zig.zon for package consumers
- Update extern fn bssl_ctx_new_from_pem to 4-parameter signature
- Pass null cert_count_out at call site (Plan 02 will wire full integration)
- All existing tests pass

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ogging

- Load embedded CA bundle via @embedfile("cacert_pem") in connect()
- Validate cert count >= 50, return CaBundleCorrupt if below threshold
- Add verbose output showing loaded embedded CA certificate count
- System CAs supplement embedded via existing SSL_CTX_set_default_verify_paths

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- SUMMARY.md with task commits and deviation documentation
- STATE.md updated with position, metrics, decisions
- ROADMAP.md updated with phase 04 completion
- REQUIREMENTS.md: SEC-06 marked complete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add brat (shell TAP testing framework) as submodule and create
automated tests for the embedded CA bundle feature covering
HTTPS fetch, cert count validation, insecure mode, and error cases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace StringHashMap with fixed-size ResponseHeader array in ResponseHead
- Add getHeader() for case-insensitive lookup preserving insertion order
- Update Response in root.zig to use slice of ResponseHeader
- Add skip_body field to Options, plumbed through to readResponse
- Update redirect Location lookup to use getHeader()
- Add tests for insertion order, case-insensitive lookup, duplicate handling

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…utual exclusion

- Add head_request, include_headers, fail_with_body fields to CliArgs
- Parse -I, -i, --fail-with-body flags in parse()
- Reject --fail + --fail-with-body combination at parse time
- Update resolvedMethod() to return HEAD when head_request is set (-I overrides -X)
- Add dedicated cli module test step in build.zig (named module tests need explicit step)
- Add 8 new tests for flag parsing and resolvedMethod behavior

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add header_writer to ReadResponseOptions and Options for wire-format header output
- Add reasonPhrase() and writeHeadersToFile() for status line + header output
- Inject header output between header parse and body streaming in readResponse
- Define NullSink in main.zig for --fail body suppression (body read but discarded)
- Wire -I to skip_body=true, -i/-I to header_writer=stdout
- Branch fetch call: --fail uses NullSink, --fail-with-body uses real sink then exits 22

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add -i and -I flag descriptions after -o
- Add --fail-with-body flag description
- Update --fail description to note body suppression
- Add examples for -I, -i, and --fail-with-body

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Covers -I, -i, --fail, --fail-with-body, and mutual exclusion.
Adds mise `test` task to run all brat tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
roobie and others added 4 commits March 8, 2026 16:08
Remove REQUIREMENTS.md (archived to milestones/) and audit file (moved to milestones/).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@roobie
roobie merged commit 8859b3d into main Mar 8, 2026
2 checks passed
@roobie
roobie deleted the feat/v1-sweep branch March 8, 2026 19:21
roobie added a commit that referenced this pull request Mar 8, 2026
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.

1 participant