Repository navigation
fix: fluid bundle wrote a tarball named .yaml and printed nothing on a split contract - #763
Merged
Merged
Conversation
With a fragments/ directory beside the contract, `fluid bundle` without --out
wrote contract.bundled.fluid.yaml instead of stdout: a pipe received nothing,
--format json put JSON under the .yaml name, and --format tgz put the gzip
tarball there too, which the next stage read as YAML ("'utf-8' codec can't
decode byte 0x8b"). `fluid ship` bundles that way on every run. The auto-detect
is gone: yaml and json go to stdout, a tgz to <contract id>.fluid.bundle.tgz,
the same for every contract (kustomize build and helm template print to stdout
the same way). --help now says both defaults.
Founder decision 2026-10-29: follow --help, rather than keep an auto file.
…d the review notes From the reviews of this branch: - the default `<contract id>.fluid.bundle.tgz` skipped the `validate_cli_path` write check an explicit --out gets, so a symlink planted at that name could point the write at a forbidden path (as root in a CI container); it is refused now (security review, LOW, pre-existing); - the stdout test for --format json read the output with yaml.safe_load, which would have passed a json format that silently printed YAML; it reads JSON; - CHANGELOG: `--out -` was redirected too, --sign/--attest failed on such a layout, and a leftover contract.bundled.fluid.yaml can be a stale copy.
# Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fluid bundlewithout--out(or with--out -) did not do what its--helpsays on a contract with afragments/directory beside it, the layoutfluid splitleaves. Found while re-checking drafts 21-29; the fix direction is a founder decision (2026-10-29): follow--help.What changed
On such a layout
fluid bundlewrotecontract.bundled.fluid.yamlinstead of stdout:fluid bundle contract.fluid.yaml | ...received nothing,--format jsonput JSON under the.yamlname, and--format tgzput the gzip tarball there, which the next stage read as YAML ('utf-8' codec can't decode byte 0x8b) and--sign/--attestrefused (signing_bundle_wrong_format).fluid shipbundles that way on every run. The auto-detect is gone:yamlandjsongo to stdout and atgzto<contract id>.fluid.bundle.tgz, the same for every contract (kustomize build and helm template print to stdout the same way).--helpnames both defaults; the CHANGELOG has a Changed entry and an Upgrade note (a script that readcontract.bundled.fluid.yamlpasses--out).From the security review: the default tgz path now gets the
validate_cli_pathwrite check an explicit--outgets, so a symlink planted at that name cannot point the write at a forbidden path.Borrow before build
Bug fix inside existing code; precedent for "no
--outmeans stdout":kustomize build,helm template, andfluiditself (-means stdout inodps.py).Validation
-n 6 --dist loadscope --ignore=tests/perf): 30434 passed; the 7 failures and 2 collection errors fail identically on clean main (dlt credential-field drift, the DuckDB sandbox broad-root tests, the liveclaudeCLI test, two CI-only modules); one MCP test that failed under load passes alone on the branch and on main. After the last commit:tests/forge+ the bundle, signing, attestation, fragments-bundle, compat-gate and security tests, 1000 passed.fluid bundle contract.fluid.yaml | headprints the composed contract;--format jsonpipes into a JSON parser;--format tgzwritescommerce.orders_events.fluid.bundle.tgz(gzip), nocontract.bundled.fluid.yaml.Reviews
--outwrite check (fixed here), and the stdout-mode logging swap adds a stderr handler without the redaction filter (follow-up).fluid ship(now leaves<id>.fluid.bundle.tgz, as on flat layouts),engine.bundle(), generated CI (explicit--out), MCP/IDE/templates (no calls).Follow-ups (pre-existing, not this change)
bundle.py~349-357) skips the secret-redaction filter on its new stderr handler and prints some events twice.fluid forgesuggestsfluid bundle --check(not a flag) andcat contract.bundled.yaml.Documentation
docs/cli/bundle.md("Default output location" table and the tgz warning),docs/cli/ship.md,docs/cli/split.md,docs/concepts/fragments.md: comes with the forge_docs pages PR of this wave.