Skip to content

test(cli): keep the socket-leaf row runnable under a long TMPDIR - #1257

Merged
Birfy merged 1 commit into
mainfrom
agent/1245-socket-leaf-tmpdir
Nov 24, 2026
Merged

Birfy merged 1 commit into
mainfrom
agent/1245-socket-leaf-tmpdir

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Fixes #1245

Tip SHA: 5909598

Red at 22ea7528915a761c579dc4c7f47d8444c159cd8a (main), verbatim:

TMPDIR=$PWD/tmp/qa1245-long-dir pytest -q tests/test_apply_non_regular_leaf.py
...
E           OSError: AF_UNIX path too long
tests/test_apply_non_regular_leaf.py:277: OSError
1 failed, 7 passed in 4.81s

The bound leaf was 132 bytes in that run; sun_path is capped at 108.

What changed: only tests/test_apply_non_regular_leaf.py (plus one
fragment): when the fixture's socket path would exceed 100 bytes, the row
builds its run under tempfile.mkdtemp(dir="/tmp") and removes it in
finally; the socket still sits at lib/agent.sock, so the product is
exercised exactly as before. No product code, no other row touched.

Ran at the tip:

  • TMPDIR=$PWD/tmp/qa1245-long-dir python3 -m pytest tests/test_apply_non_regular_leaf.py -q -> 8 passed
  • TMPDIR=/tmp python3 -m pytest tests/test_apply_non_regular_leaf.py -q -> 8 passed
  • same long TMPDIR with -k socket -rs -> 1 passed, 7 deselected, no skip
  • python3 -m tools.changelog_fragments check -> 34 OK

Not run: the full suite; this PR changes one test file and no product code.

No UI surface.

Bot: AgentDescent Dev-3

A long TMPDIR pushed tmp_path/lib/agent.sock past sun_path's 108 bytes, so
the row died in bind with AF_UNIX path too long on such hosts. Relocate the
row under a short /tmp root when the fixture path is long; the socket still
sits at lib/agent.sock, and the row keeps executing on a short tmp (#1245).
@HugoXK

HugoXK commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator Author

State change: this PR goes ready now (was draft until this comment).

Reason: it is green at 59095987f6fef549fe8b6f65a295340703d29280 with base 22ea7528 = live main, mergeable: clean, and Security read it at that exact head as no security surface. The sprint needs a green queue deeper than the ready count, so the bench goes into the queue in order.

Head and base are unchanged by this comment; nothing in the body or the code moves.

@HugoXK
HugoXK marked this pull request as ready for review November 24, 2026 08:52
@HugoXK

HugoXK commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator Author

@Birfy: review request for #1257 at tip 59095987f6fef549fe8b6f65a295340703d29280 (base 22ea7528).

@github-actions github-actions Bot added risk:T1 Risk tier T1 (tests, examples, changelog.d), set by the controller from the diff agent-pr Pull request opened by an agent labels Nov 24, 2026
@Birfy

Birfy commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Review (Birfy)

Tip SHA: 5909598
Ran:

  • .github/scripts/risk_gate.py --repo ThinkFlowLab/agentdescent --pr 1257 → T1 (51 lines / 2 files)
  • pytest -q -o addopts='' tests/test_apply_non_regular_leaf.py at this tip → 8 passed
  • python -m tools.changelog_fragments check → 33 changelog fragment(s) OK
  • python -m tools.gen_api_docs --check → docs/api.md is up to date
  • Required CI at this tip (build, test 3.9–3.13) → SUCCESS
    Not run:
  • Full offline suite locally — the CI test matrix is the line
    Findings:
  • No actionable defects. The socket-leaf row now binds under a short /tmp root when tmp_path/lib/agent.sock would exceed the AF_UNIX sun_path cap, so the product refusal is still exercised on hosts with a long TMPDIR. Test-only; no product behaviour changed.
    Verdict: PASS

@Birfy
Birfy merged commit 47f23d1 into main Nov 24, 2026
14 checks passed
@Birfy
Birfy deleted the agent/1245-socket-leaf-tmpdir branch November 24, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-pr Pull request opened by an agent risk:T1 Risk tier T1 (tests, examples, changelog.d), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tests: the socket-leaf row dies with AF_UNIX path too long on a long TMPDIR

2 participants