Skip to content

Dep bump (madder/dewey/tommy/tap → 2026-06-07) breaks 5 bats tests: triage notes for a future attempt #237

@sfriedenberg-etsy

Description

@sfriedenberg-etsy

What this is

A record of an aborted bulk amarbel-llc dependency bump and everything we
observed, so a future attempt starts from facts instead of re-discovering them.
The bump was not merged. Most of the attribution below is theory — we
explicitly did not isolate causes. Treat the "Facts" as load-bearing and the
"Theories" as starting hypotheses to verify.

Branch state

Work lives on smart-hazel (unmerged), two commits past c380c2df3:

  • 894fe3b4f chore(deps): bump amarbel-llc flake inputs + regenerate tommy codegen
  • 16f4ebe3c test(ui): migrate cli_error_tree to dewey v0.3 HTTPRender API

Both merge-this-session attempts failed the pre-merge just hook. These
commits can be cherry-picked or discarded by a future attempt; nothing here is
authoritative beyond "it compiled and got this far."

Facts (observed in tool output)

Deps that moved

just go/resync-flake-go re-pinned 5 Go modules to match the bumped flake
inputs:

Module From To
madder/go v0.3.31 (00613b3, 05-31) v0.3.35-pre (416bcbf, 06-07)
purse-first/libs/dewey v0.2.6 (67a6f4d) v0.3.1-pre (422cb1c, 06-07)
purse-first/libs/go-mcp v0.2.6 v0.3.1-pre (422cb1c)
tap/go v0.1.11 (c3a844e) v0.1.12-pre (cc0ee92)
tommy v0.2.9 (de8fc5d) v0.3.3-pre (75834a1, 06-07)

Flake inputs also advanced: bats, igloo, treelint (the last migrated to
conformist upstream — the lock diff added a conformist subtree and dropped
treelint/treefmt-nix nodes).

Compile-time breaks we fixed to get the tree building

  1. tommy v0.3 cst API: committed *_tommy.go already referenced
    cst.FindChildInlineTable / cst.FindChildTable (and _seen duplicate-key
    guards) that did not exist in the v0.2.9 module pin. Fixed by
    resync-flake-go + go/build-go-generate regenerating against v0.3.3.
  2. dewey GetStatusCode()HTTPStatusCode() (returns http_statuses.Code):
    internal/sierra/remote_http/request_response.go. Rewrote Response.Error()
    to extract status via dewey's HTTPStatusCarrier interface.
  3. dewey HTTPStatusError.WrapIncludingHTTP(x).Wrap(x).HTTPRender(), and
    the wire render dropped the errors. prefix (errors.HTTP: 501 …HTTP: 501 …):
    go/lib/alfa/ui/cli_error_tree_state_test.go. This test only compiles under
    -tags test (dewey's pkgs/ui harness is //go:build test-gated), so a bare
    go build ./... did NOT surface it — only the nix test-go-unit lane
    (go test -tags test,debug ./...) did. Lesson: verify with the lane's tags,
    not go build ./....

Runtime test failures (2nd merge attempt reached the bats lane)

test-go-unit PASSED. test-bats failed with 5 of 505 tests. Observed
outputs:

  • Deprecate addTypeAndExpandedIfNecessary and design type inheritance #43 blob_store_sync_twice — path-text mismatch. Expected regex
    .../\.madder/local/share/blob_stores/test/blob_store-config; actual
    .../.xdg/data/madder/blob_stores/test/blob_store-config.
  • Add dodder-level integration tests for SFTP blob stores #83 checkin_explicit_workspace_delete_files and
    #333 organize_default_tags_workspace — both fail with runtime error
    duplicate key "tags", identical stack through
    madder/go/internal/charlie/hyphence/coder_tommy.go:35
    coder_type_map.go:103 → dodder konfig_edit.go / organize path.
    coder_tommy.go:35 is just errors.Wrap(err) around coder.Decode(input);
    the duplicate key string is emitted by tommy-generated decode code (the
    _seen map guard).
  • remote_http TCP path is broken: nonce sig generation fails purpose/format validation #165 init_with_pandoc_tools_creates_type_objects — the !md type-blob
    digest changed: expected @blake2b256-ctgjs28…, actual @blake2b256-wn23tu….
    This digest is hardcoded in current_version/format_pandoc.bats, not in
    .fixtures.env.
  • #351 push_history_zettel_type_tag_yes_conflicts — output has one EXTRA
    line: the message import failed with conflicts, merging required is rendered
    twice (once as the line, once as a └── tree child).

Things that PASSED (so they're not broken by the bump)

Fixture regen does NOT apply here

VCurrent is unchanged (V15). just test-bats-update-fixtures only regenerates
previous_versions/v*/; all 5 failures are in current_version/. Per CLAUDE.md
("update assertions, not fixtures" for output changes), regen is the wrong tool
for these.

Theories (NOT verified — isolation was aborted)

We did not bisect, so every causal claim below is a hypothesis:

  • Deprecate addTypeAndExpandedIfNecessary and design type inheritance #43 path shift → theory: madder's XDG store-id scope change. madder log
    between the revs shows 7c9f04b24 fix: init resolves unprefixed store-ids in XDG scope like write (closes #227) and f071f0ae4 / a91af49c1 touching
    store-id layout. Plausible but unconfirmed.
  • Add dodder-level integration tests for SFTP blob stores #83 / #333 duplicate key "tags"theory: tommy v0.3 added strict
    duplicate-key rejection in generated decoders; dodder's konfig/organize emit
    path produces a doubled tags key that old tommy tolerated. Unknown
    whether this is (a) a dodder bug emitting a real duplicate, or (b) a
    tommy encode/decode asymmetry, or (c) intended strictness needing a dodder
    fix.
    This is the one most likely to be a genuine regression rather than
    drift — needs the emitted config-blob bytes inspected.
  • remote_http TCP path is broken: nonce sig generation fails purpose/format validation #165 digest change → theory: tommy re-serialization changed the
    canonical type-blob bytes, OR embedded pandoc-tool content changed. Unknown
    which.
  • #351 doubled error line → theory: dewey v0.3.0's documented rendering
    change (madder commit 4611ba3e3: "Error() returns the underlying user
    message instead of errors.HTTP: 400 …") altered how wrapped errors render in
    dodder's tree encoder, adding a duplicate node. This is the strongest
    fact→theory link (the rendering change is documented upstream) but still not
    isolated.

Coupling constraint (why isolating "just dewey" is hard)

Old madder v0.3.31 (00613b3) go.mod requires dewey v0.1.8 and an old
tommy pseudo (87255e8). madder v0.3.35 was built against dewey v0.3.x / tommy
v0.3.x (its own HTTP helpers and hyphence coders). So reverting madder/tommy
while advancing only dewey may not produce a buildable tree — the three move as
a set. A future isolation attempt should probably bisect by reverting tommy
alone
(madder v0.3.35 + dewey v0.3.1 are a shipped-together pair, more likely
to compile) to test the duplicate key / digest hypotheses.

Suggested approach for the next attempt

  1. Re-apply the bump (nix flake update + just go/resync-flake-go) and the
    three compile fixes (cherry-pick 894fe3b4f + 16f4ebe3c or redo).
  2. Bisect the 5 runtime failures by reverting tommy alone first.
  3. For duplicate key "tags": reproduce organize_default_tags_workspace
    locally and inspect the config-blob bytes dodder emits — bug vs. strictness.
  4. Verify all test-code with the lane's tags (go test -tags test,debug ./...),
    never a bare go build ./....
  5. Deprecate addTypeAndExpandedIfNecessary and design type inheritance #43 / remote_http TCP path is broken: nonce sig generation fails purpose/format validation #165 are likely assertion updates once the underlying behavior changes
    are confirmed intended.

Related

🤡 Filed by Clown (0.3.10+bb6560d, built from bb6560d).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions