Repository navigation
fix: mount the constitution checkout, not the link to it - #42
Merged
Merged
Conversation
Podman's z relabels the path it is handed. Handed the ln -sn link, it relabelled the link and left the checkout at cache_home_t, so on an SELinux host every cold tag reported 'missing validate-constitution.py' and the constitution gate could not run. Mount the resolved directory. The host-contract test now asserts the mount source is not a symlink; it fails against the old launcher. Found converting mcp-atlassian (RT#1552). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R7Y1jh5QhdxRuFKyWVev5h
| log_since | ||
| _mnt=$(tr ' ' '\n' < "$RUN/podman.log" | grep ':/cache/constitution/' | head -1) | ||
| _mnt=${_mnt%%:*} | ||
| if [ -n "$_mnt" ] && [ -d "$_mnt" ] && [ ! -L "$_mnt" ]; then |
There was a problem hiding this comment.
LOW (Test Coverage): This assertion checks only that the mount source is some existing non-symlink directory; it does not verify that it is the resolved constitution checkout. A regression that mounts an unrelated directory could still pass.
Suggestion: Compare _mnt with the canonical path of the checkout created by this test, rather than checking only that it is a directory and not a symlink.
Evidence:
if [ -n "$_mnt" ] && [ -d "$_mnt" ] && [ ! -L "$_mnt" ]; then
ok "the constitution mount names the checkout, not the link"
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.
Summary
host_constitutionmounted theln -snlink to the host's constitution checkout. Podman'szrelabels the path it's given, so it relabelled the link, and the checkout keptcache_home_t. On an SELinux-enforcing host, every cold tag made the gate reportmissing validate-constitution.pyand exit "could not run".cd -P && pwd, POSIX, no new host tool).tests/test_host_contract.shasserts that the mount source is a real directory and not a symlink. Verified that it FAILS against the old launcher and passes with this change.Reproduced on Fedora 44 while converting mcp-atlassian (RT#1552): a cold
~/.cache/python-sdlc/constitution, thensdlc constitution, gave "could not run".ls -Zshowed the link atcontainer_file_tand the checkout atcache_home_t.The local Gatehouse hook was skipped because this seat has no Gatehouse key. CI's Gatehouse reviews it.
Test plan
sh tests/test_host_contract.sh, which passes, including the new checkbin/sdlcfails on the new check🤖 Generated with Claude Code
https://claude.ai/code/session_01R7Y1jh5QhdxRuFKyWVev5h