small gleam coding and persistent agent daemon with a detachable cli and a canvas ui albedo.sh

files.paths misses matches when ripgrep configuration enables color #161

Closed aly.codes
Closed opened by aly.codes

Reproduction #

Set RIPGREP_CONFIG_PATH to a ripgrep configuration file containing --pretty. In an Albedo workspace, create src/deep/stream_test.go, then run:

print(await files.paths('src/*/*_test.go'))

Expected: the result includes src/deep/stream_test.go. Observed: an empty result.

Evidence #

The full E2E suite failed in python_test.PythonToolsTests.test_paths_globs_a_path_from_the_workspace_root, returning [] for both path patterns. In an isolated directory, rg --files . under this configuration produced raw bytes \x1b[0m\x1b[35m./src/deep/stream_test.go\x1b[0m\n. priv/python/albedo_plugins/files.py matches the raw output lines against the glob, so the ANSI sequences prevent a match. This was observed with ripgrep 15.2.0.

files.paths should handle a user's ripgrep configuration without corrupting its machine-readable results. A regression test can set RIPGREP_CONFIG_PATH to a temporary configuration with --pretty and check the path through the real kernel.

oof i wonder what else we’re relying upon that can bite like this. i should double check direnv too

sorry for my slop, I’m gonna see about it later and needed to make a note!

Fixed in f07ff3f6, now on main. files.paths passes --color=never to ripgrep so a user configuration containing --pretty cannot add ANSI escapes to the paths. Added a real-daemon regression test with RIPGREP_CONFIG_PATH set to that configuration. All 34 Python E2E tests and ./test.sh pass.

Sign up or Sign in to add to the discussion.