Skip to content

feat: relai tidy and post-merge hook; discovery follow-ups; test minors - #11

Merged
ECG-Rudy-Glt merged 2 commits into
mainfrom
feat/tidy-and-discovery-followups
Nov 4, 2026
Merged

ECG-Rudy-Glt merged 2 commits into
mainfrom
feat/tidy-and-discovery-followups

Conversation

@ECG-Rudy-Glt

Copy link
Copy Markdown
Owner

What

Housekeeping after merges should not depend on someone remembering it: on 2026-11-04 about thirty tasks stayed "in progress" after their code was merged. This PR makes it automatic, fixes the minors of the independent light test, and does the first follow-ups of the discovery.

  • relai tidy [--apply] (OpenSpec auto-tidy-and-discovery-followups): closes a task when a commit on the default branch says so with a keyword and the id (Closes relai-7nk, fixes #relai-7nk); refreshes .beads/issues.jsonl without the owner e-mail; deletes fully merged local branches (git branch -d). Dry run by default, never commits, closes nothing from a feature branch, and leaves a task that is only named open (it is reported). Ids are matched whole (p-1 is not p-10).
  • relai init --hooks now also installs a post-merge hook running relai tidy --apply after every pull or merge. The pre-commit hook gives bd at most 20 s (RELAI_HOOK_TIMEOUT), with or without timeout(1) (test minor Golden-path scaffolding: relai new <template> <dir> #2).
  • A repeated provides: key kept only the last list and lost the first silently; both are kept and a warning is printed (test minor Cross-repo index, degraded-mode handoff, release pipeline #1).
  • Discovery follow-ups: --depth N for discover --links and index build --scan (nested repos named by path, node_modules/vendor/build skipped, never inside a repo); relai find shows works with: and puts the repos linked with the one you are in first ([linked from here]); --propose now also proposes a repo named in two or more CI/deploy/config files (workflows, k8s, compose, yaml...) because that is far more often a real dependency than a name in a document, and --min-weak N sets the document-only threshold (default 5).
  • AGENTS.md and the README tell contributors to end the commit message of finished work with Closes <task id>.

Verified

go vet, go test -race -count=1 ./... (96 tests); tidy on a synthetic repo (only keyword+id closes, p-10 untouched, already-closed ignored, feature branch closes nothing, only merged branches deleted, owner removed from the export, no commit, no bd = tasks left open and said so); hooks tested with a hanging bd, a failing relai, and without timeout(1).

Not done / for review

  • The new propose rule (config files) was reasoned from one real folder, not measured on a second one; no agent has followed --prompt yet. Both are in the next test session.
  • Past merged work has no Closes lines, so tidy will not close it; those tasks are closed by hand once.
  • The release tag v0.3.0 exists but GitHub did not start the release workflow (a GitHub incident was open at the time); see the conversation.

Closes relai-fwx

…overy follow-ups (depth, links in find, config evidence); duplicate provides key keeps both lists

Closes relai-fwx
@ECG-Rudy-Glt ECG-Rudy-Glt reopened this Nov 4, 2026
@ECG-Rudy-Glt
ECG-Rudy-Glt merged commit 68d4692 into main Nov 4, 2026
2 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