Skip to content

fix(tests): wait for routing fixture maintenance - #800

Merged
ss-o merged 1 commit into
mainfrom
bug-796-foreground-maintenance
Oct 15, 2026
Merged

ss-o merged 1 commit into
mainfrom
bug-796-foreground-maintenance

Conversation

@ss-o

@ss-o ss-o commented Oct 15, 2026

Copy link
Copy Markdown
Member

Summary

Fixture commits can leave detached Git maintenance writing into a temporary repository while Python removes it, producing Directory not empty during test cleanup. Keep automatic maintenance in the foreground for commands issued by the Org Routing test helper, using both the current setting and its garbage-collection fallback.

Add a native Git regression that forces loose-object packing, rejects a detach event, and verifies that a pack exists before the helper returns. The controls apply only to fixture commands and do not change repository or global settings.

Refs #796; follow-up to the fixture cleanup failure seen during #797. Formatting was separated into #799.

Verification

  • The regression failed against the old helper with the detach assertion and the matching cleanup error, then passed with foreground maintenance.
  • 105 Org Routing, policy-report and knowledge-delivery tests passed on Python 3.14 and pinned Python 3.10.8.
  • All 180 repeated fixture cases passed with forced automatic maintenance.
  • The affected-file Trunk check reports no new issues; two inherited Bandit findings remain. Inventory and whitespace checks pass.

Git documents the foreground and detached behavior in its maintenance configuration.

Agent handoff

The reproduced cleanup race is addressed. The exact writer in earlier hosted failures was not captured, so their historical cause remains unconfirmed. This changes test infrastructure only.

@ss-o
ss-o requested a review from a team as a code owner October 15, 2026 06:33

@ss-o ss-o left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fallback review under ADR-0026: maintainer elected, no Copilot request on 473b325

No actionable findings.

  • Correctness: fixture Git commands pass both foreground-maintenance controls. Git waits for the housekeeping process tree before the helper returns, avoiding concurrent writes during temporary-directory cleanup. The settings apply to each command and are not persisted.
  • Regression: the native test forces loose-object packing with detachment enabled in the fixture configuration. It checks that no detach event occurs and that packing has completed. The previous helper failed with the detach assertion and matching cleanup error; the repaired helper passes.
  • Verification: 105 related tests pass on Python 3.14 and 3.10.8, as do 180 forced-maintenance repetitions. All 11 hosted checks pass on this head. Trunk reports no new issues; two inherited Bandit findings remain. Inventory, whitespace and source-signature checks pass.
  • Scope and documentation: only the fixture helper and its regression change. Formatting landed separately in #799. Product behavior, persisted settings and published policy are unaffected.
  • Limits: this is self-review. The native reproduction used Git 2.56. The exact writer in historical CI failures was not captured. Visual Markdown rendering was not inspected.

@ss-o
ss-o merged commit 9888890 into main Oct 15, 2026
11 checks passed
@ss-o
ss-o deleted the bug-796-foreground-maintenance branch October 15, 2026 06:35
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