Skip to content

Devlayer - #31

Merged
anoek merged 32 commits into
mainfrom
devlayer
Nov 15, 2026
Merged

anoek merged 32 commits into
mainfrom
devlayer

Conversation

@anoek

@anoek anoek commented Nov 14, 2026

Copy link
Copy Markdown
Owner

No description provided.

anoek added 30 commits November 13, 2026 05:05
… origin outside the layer, no real clean in tests
The selection tests run from project directories under the system temp
dir with --no-bind-cwd. When /tmp is a tmpfs, it is not part of the
layer's overlay, so the project directory did not exist inside the layer
and the layer failed to start with "failed to set CWD". Leave the cwd
bind on, as it is for a user, and write the out-of-project file for the
status check into the repository, which is always overlaid.
…mes in comments

The internal rename pass turned the limits test's /sys/fs/cgroup/sandbox
into /sys/fs/cgroup/layer, but the cgroup parent is devlayer, so the test
never found the layer's cgroup. Also correct comments that named
LAYER_IGNORED, LAYER_NO_DEFAULT_BINDS, .layer.toml, ~/.config/layer,
/etc/layer.conf and /sys/fs/cgroup/layer.
The devlayer command waits on its child inside the layer's cgroup, so
when the cgroup ran out of memory the kernel sometimes killed devlayer
instead of (or as well as) tail, and the test got no exit status. tail
now raises its own oom_score_adj to 1000 so it is always picked first.
- Resolve the storage dir once; record the layer name's source per branch
- Store a single LayerOrigin in Config; skip loading it for new layers, so
  a concurrent launch's origin isn't picked up
- Only remove an unparseable pid file while holding the layer lock, so
  list can't remove one that is being written
- Share pid/lock path helpers between Layer and util
- Pass only PID 1's pid from the supervisor; drop redundant setresuid/gid
- config: report bind_cwd's real source, drop the no_bind_cwd key
- Check accept/reject patterns before choosing the layer
- Parse true/false env vars in one loop; bad values error, empty ignored
- Make LLVM_PROFILE_FILE absolute in the Makefile, so the supervisor's
  coverage data lands in coverage/profraw
- Fix flaky ai_test_limits_applied; share pid file helpers in the fixture
After tail is OOM-killed, head can still be writing to the pipe before
tail's memory is freed, which triggers a second OOM kill. With head at
the default oom_score_adj, that second kill took the waiting devlayer
command, so the test got no exit status (about 1 in 40 runs under load).
@anoek
anoek merged commit 358f5c4 into main Nov 15, 2026
6 checks passed
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