Commit dcdbbae
committed
docs: self-packaging across architecture / decisions / security / CLI
Part of #40. Closes #50.
Captures the rationale, mechanism, and operational surface of
self-packaging (#41-#49) in the locations operators and future
maintainers actually look.
- docs/spec/ARCHITECTURE.md
* New "Self-Packaging (optional)" subsection under Key Components,
naming archive_io / selfpath / bundle_locator / macho_bundle /
EmbeddedArchiveFileProvider / EmbeddedFileSystem / pack with
file paths.
* New "Self-Packaging Bootstrap" data-flow block that traces the
sequence from main() through detectAndRegisterEmbeddedBundle
to FileProviderFactory dispatch to RegisterEmbeddedFileSystem.
- docs/spec/DESIGN_DECISIONS.md
* New §9 "Self-Packaging via Appended ZIP" with four sub-decisions:
9a. ZIP appended after the executable -- why-not tar / 7z /
custom container; the `bytes_in_last_block(1)` spike gotcha.
9b. Reuse IFileProvider -- why-not extract-to-tmpdir.
9c. embed:// DuckDB FileSystem -- why-not force everything
through IFileProvider (streaming); the Glob / SeekPosition
spike-runtime catch.
9d. macOS reserved-segment + re-codesign -- why-not append-and-
ad-hoc-sign (notarisation).
* Each item lists Decision / Rationale / Why-not alternatives /
Tradeoffs, matching the file's existing structure.
* Summary updated to add "Deployability" as the sixth design goal
that §9 serves.
- docs/spec/components/security.md
* New "Secrets and the bundle" section covering the two enforcement
mechanisms (pack-time deny list and runtime env-var contract).
Lists every credential env var with its scope.
* Cross-reference to DESIGN_DECISIONS §9 and CONFIG_REFERENCE §1.4.
* Best-practices list grows an 8th item ("never bundle secrets")
with a forward pointer to the section.
* Source-files table grows `src/pack.cpp (IsSecretExcluded)`.
- docs/CLI_REFERENCE.md
* New "## 3. Self-Packaging Subcommands" section with full
reference for `pack`, `info`, `unpack`, plus a macOS subsection
covering the reserved-segment + codesign flow and the
--macos-append legacy escape hatch.
* Sections 4-7 renumbered (Environment Variables / Usage
Examples / Signal Handling / Exit Codes); TOC updated to match.
* Environment-variables table grows FLAPI_CONFIG, FLAPI_LOG_LEVEL,
SOURCE_DATE_EPOCH, CODESIGN_IDENTITY entries.
- AGENTS.md (target of the CLAUDE.md symlink)
* New "6. Self-Packaging" entry under Core Concepts -- short
operator-style overview, command examples, mechanism, secrets
invariant, reproducibility note. Forward links to DESIGN_DECISIONS
§9 and CLI_REFERENCE §3 for depth.1 parent ec12140 commit dcdbbae
5 files changed
Lines changed: 402 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
404 | 454 | | |
405 | 455 | | |
406 | 456 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
28 | | - | |
29 | | - | |
| 33 | + | |
| 34 | + | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
| |||
396 | 401 | | |
397 | 402 | | |
398 | 403 | | |
399 | | - | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
400 | 519 | | |
401 | 520 | | |
402 | 521 | | |
| 522 | + | |
| 523 | + | |
403 | 524 | | |
404 | 525 | | |
| 526 | + | |
| 527 | + | |
405 | 528 | | |
406 | 529 | | |
407 | 530 | | |
| |||
418 | 541 | | |
419 | 542 | | |
420 | 543 | | |
421 | | - | |
| 544 | + | |
422 | 545 | | |
423 | 546 | | |
424 | 547 | | |
| |||
474 | 597 | | |
475 | 598 | | |
476 | 599 | | |
477 | | - | |
| 600 | + | |
478 | 601 | | |
479 | 602 | | |
480 | 603 | | |
| |||
499 | 622 | | |
500 | 623 | | |
501 | 624 | | |
502 | | - | |
| 625 | + | |
503 | 626 | | |
504 | 627 | | |
505 | 628 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
142 | 159 | | |
143 | 160 | | |
144 | 161 | | |
| |||
167 | 184 | | |
168 | 185 | | |
169 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
170 | 217 | | |
171 | 218 | | |
172 | 219 | | |
| |||
0 commit comments