Skip to content

Clear a removed package's failure without the hook window (4.0.0-B1) - #15

Merged
KeithRaghubar merged 1 commit into
mainfrom
fix/stale-removed-failures
Oct 30, 2026
Merged

KeithRaghubar merged 1 commit into
mainfrom
fix/stale-removed-failures

Conversation

@KeithRaghubar

Copy link
Copy Markdown
Owner

Summary

sysforge build --failed queued ethtool-git after it had been replaced with the repo ethtool. The same happened to sane-git and wlrctl-git, which were removed shortly after their failures were recorded.

A removal cleared the recorded failure (3.5.0-B120) only when a reader saw the pacman hook's record of that transaction, and that record can be lost first. A failed package that sysforge tracks but that is no longer installed now counts as removed too. The new install_reconcile.clear_stale_failures does both checks and is used by:

  • update's reconcile, which runs before the superset sync prunes the entry
  • state failed
  • doctor --state
  • build --failed, in memory only, the same way state failed lists

A package whose first build failed was never installed, so it keeps its failure. A split pkgbase keeps its failure while a sibling is installed, checked through %BASE% in the local DB.

Test tier

Unit tests are enough here. The defect is in how sysforge reads its own state (the hook window and the build_state entries), and tests/test_removed_failures.py already uses real sentinel files and a real local pacman DB tree. The hook and the root/user boundary did not change.

Testing

  • 5 new tests in tests/test_removed_failures.py; 4 failed before the fix
  • Full suite: 7724 passed
  • make lint, check-standards, check-design and check-surface pass

🤖 Generated with Claude Code

build --failed queued ethtool-git after it was replaced by the repo
ethtool: the failure was only cleared when a reader saw the pacman
hook's removal record, and that record can be gone first. A tracked
build_state entry that is no longer installed now counts as removed
too, through install_reconcile.clear_stale_failures, used by update's
reconcile (before the sync prunes the entry), state failed, doctor
--state and build --failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KeithRaghubar
KeithRaghubar merged commit bf2f3d0 into main Oct 30, 2026
3 checks passed
@KeithRaghubar
KeithRaghubar deleted the fix/stale-removed-failures branch October 30, 2026 21:12
KeithRaghubar added a commit that referenced this pull request Oct 30, 2026
## Summary

The `--config` axis flag (3.5.0-F18) and the loaded config both lived on
`args.config`:

- **Bare `sysforge doctor`** read the loaded config as the flag and ran
only the config axis. It printed one section and exited, which looked
like a hang.
- **`sysforge doctor system`** read the flag's `False` as an
already-loaded config and ran every axis against `{}`, so the toolchain,
cache, graphics and storage checks ignored the live config.

The flag now stores to `config_axis`. Its spelling is unchanged, so
completions, the man page and `surface.json` are untouched.

## Test tier

Unit tests are enough here. The bug is argparse wiring plus `pre_check`,
and the new tests drive the real parser (`cli_args`) and `pre_check`
with a non-empty config. The existing `_make_args` helper passes
`config={}`, which is falsy and hid the collision.

## Testing

- 3 new tests in `tests/test_doctor.py`, all failing before the fix
- Full suite: 7722 passed
- A real `sysforge doctor` now renders all 14 default axes in about 13 s

## Merge order

Merge #15 first: it holds `4.0.0-B1`, and until it merges
`check-standards` warns about the gap at B1. Both PRs add a `## Fixed`
section to `docs/release-notes/unreleased.md`, so this branch needs a
small rebase after #15 merges: keep one heading with B1 before B2.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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