Skip to content

Disable cargo publish for all crates - #164

Merged
getappz merged 4 commits into
masterfrom
ci/disable-publish
Jul 13, 2026
Merged

Disable cargo publish for all crates#164
getappz merged 4 commits into
masterfrom
ci/disable-publish

Conversation

@getappz

@getappz getappz commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Closes #163

Add \publish = false\ to root + all 6 workspace crate \Cargo.toml\ files.

We have installer scripts — cargo publish + binstall publish are unused.

Summary by CodeRabbit

  • Chores
    • Updated crate version metadata across multiple components.
    • Marked several components as not intended for registry publishing to avoid accidental releases.
    • Streamlined release automation to focus on creating version-bump PRs and removed the use of a registry publish token.
    • Made PPA publishing conditional so it only runs when the required GPG key is configured.
    • Shortened the release task description to reflect the new streamlined behavior.

@getappz getappz added the tech-debt Internal refactoring / cleanup, no user-facing feature label Jul 13, 2026
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Cargo package versions were adjusted in the root package and six workspace crates. Manifests now explicitly disable publishing, internal path dependencies no longer specify versions, and release workflows update registry credentials, PPA dispatch, and release task documentation.

Changes

Publishing metadata and release automation

Layer / File(s) Summary
Workspace manifest publishing controls
Cargo.toml, crates/*/Cargo.toml
Package versions and publish = false settings were updated across the root package and workspace crates; internal path dependencies no longer include explicit version constraints.
Release publishing configuration
.github/workflows/release-plz.yml, .github/workflows/release.yml, mise.toml
Release-PR automation no longer receives CARGO_REGISTRY_TOKEN, PPA dispatch requires PPA_GPG_KEY, and the release task description now only describes creating a version-bump PR.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is missing the required Summary, Test plan, and Notes for reviewers sections from the template. Add the template sections: Summary, Test plan with the three checklist items, and Notes for reviewers covering risk areas and backwards compatibility.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly reflects the main change: disabling Cargo publishing for the workspace crates.
Linked Issues check ✅ Passed The PR adds publish=false to the root and all six workspace crates and preserves the requested publishing cleanup.
Out of Scope Changes check ✅ Passed No clearly unrelated changes are evident beyond the publishing and workflow cleanup requested by the issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/disable-publish

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Line 266: Update the job-level condition using secrets.PPA_GPG_KEY so it no
longer references the unavailable secrets context. Move the key-presence check
into the relevant dispatch step, or expose it through a prior job output and
reference that output in the job condition.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b7812c6e-62ec-43f3-8b55-6c9518ccf07c

📥 Commits

Reviewing files that changed from the base of the PR and between 9c8c7cb and a6984cf.

📒 Files selected for processing (3)
  • .github/workflows/release-plz.yml
  • .github/workflows/release.yml
  • mise.toml
💤 Files with no reviewable changes (1)
  • .github/workflows/release-plz.yml

Comment thread .github/workflows/release.yml Outdated
… is disabled

skill-registry still required agent-registry ^0.1.1 while this branch downgraded
agent-registry's own version to 0.1.0, breaking dependency resolution. Since
every crate here is publish = false, version reqs on path-only deps serve no
purpose - drop them everywhere instead of keeping numbers in sync forever.

Also moves the PPA_GPG_KEY secret check from the job-level if: down to the
step, per CodeRabbit: secrets are not reliable in job-level if: conditionals.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Line 271: Update the step condition in the release workflow to expose
PPA_GPG_KEY through the step’s env configuration, then test env.PPA_GPG_KEY in
the if expression instead of referencing the secrets context directly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 47d23f88-20a2-47f1-ae4a-f8eae170186e

📥 Commits

Reviewing files that changed from the base of the PR and between a6984cf and bf4e794.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • .github/workflows/release.yml
  • Cargo.toml
  • crates/skill-registry/Cargo.toml
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/skill-registry/Cargo.toml

actions: write # gh workflow run
steps:
- name: Dispatch ppa-publish workflow
if: secrets.PPA_GPG_KEY != ''

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major

The secrets context is still invalid in this if expression.

Moving the condition to the step does not make secrets.PPA_GPG_KEY available to if. Expose the secret through env first, then check env.PPA_GPG_KEY:

Proposed fix
   trigger-ppa-publish:
     name: Trigger PPA publish
     needs: release
     runs-on: ubuntu-latest
+    env:
+      PPA_GPG_KEY: ${{ secrets.PPA_GPG_KEY }}
     permissions:
       actions: write
     steps:
       - name: Dispatch ppa-publish workflow
-        if: secrets.PPA_GPG_KEY != ''
+        if: env.PPA_GPG_KEY != ''

[actionlint] reports this same context-availability problem, so the workflow remains invalid.

🧰 Tools
🪛 actionlint (1.7.12)

[error] 271-271: context "secrets" is not allowed here. available contexts are "env", "github", "inputs", "job", "matrix", "needs", "runner", "steps", "strategy", "vars". see https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability for more details

(expression)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml at line 271, Update the step condition in the
release workflow to expose PPA_GPG_KEY through the step’s env configuration,
then test env.PPA_GPG_KEY in the if expression instead of referencing the
secrets context directly.

Source: Linters/SAST tools

@getappz
getappz merged commit 6e7f0e8 into master Jul 13, 2026
16 checks passed
@getappz
getappz deleted the ci/disable-publish branch July 13, 2026 08:43
getappz added a commit that referenced this pull request Jul 13, 2026
…ict with ci/disable-publish

Root Cargo.toml conflicted on the dependency block: master (via #164) had
already dropped version pins from internal path deps. Applied the same
treatment to the newly added agentflare-backend/db_kit deps, and added
publish = false to both crates' own Cargo.toml for consistency.
getappz added a commit that referenced this pull request Aug 21, 2026
…ting two agents race the same worktree (#582)

* fix: orphan reconciliation never killed a still-alive subprocess, letting two agents race the same worktree

A daemon restart doesn't kill an already-spawned agent subprocess tree —
it's deliberately placed in its own process group (cmd.process_group(0),
needed so kill_tree's targeted kill works during normal timeouts), so it
survives as a genuine orphan invisible to the new daemon. reconcile_orphaned_running
only updated the DB row and released the claim, then immediately restored
ready-for-work — letting a fresh dispatch race the still-running orphan
into editing the same files concurrently. Hit in production 2026-08-21
(item #164): a claude-code and an opencode process both ended up bound to
the same worktree, corrupting it.

Kill anything still touching the item's worktree (pgrep -f against the
worktree path, robust to any process-tree shape) before releasing the
claim or relabeling ready-for-work.

Agentflare-Agent: claude-code
Agentflare-Branch: docs/opencode-model-mapping-fallback

* fix: kill_processes_touching_worktree wasn't cross-platform (Windows had no pgrep)

The original fix used pgrep -f directly, which doesn't exist on Windows
(caught by CI: build (windows-latest) failed). Split into #[cfg(unix)]
(pgrep, unchanged) and #[cfg(windows)] (Get-CimInstance Win32_Process
CommandLine match via PowerShell) implementations. Gated the new test
#[cfg(unix)] since its yes-based orphan simulation isn't portable.
Trimmed comments to stay under the LOC gate.

Agentflare-Agent: claude-code
Agentflare-Branch: fix/orphan-reconcile-kill-live-process

---------

Co-authored-by: shiva <shiva@gosysinfo.tech>
getappz added a commit that referenced this pull request Aug 24, 2026
…ck + workflow-store smoke test) (#596)

* feat: add dispatch preflight/init validation step (item #164)

Duplicate-work detection (pre-claim): before dispatching an item,
find_duplicate_pr searches GitHub for a PR already carrying the item's
'for item #N' marker. A merged match self-heals the item to completed
and cleans up its worktree instead of letting a redispatch re-do
already-merged work (the near-miss from items #122/#156, where tracked
state fell out of sync with a merged PR). An open match skips dispatch
and flags for human review instead of racing a second PR.

Workflow-store smoke test: flare_workflow::smoke_test does a real
save/delete/load round-trip against the actual on-disk SqliteStore
schema. Wired into daemon boot (dashboard::server::run) and into
dev_install::run via a new hidden 'daemon workflow-store-smoke-test'
subcommand, run against the freshly built binary right after a binary
swap -- the exact trigger (item #576) that let a broken delete_state
go undetected for ~33h. On failure, refuses dispatch instead of letting
every claimed item retry-and-fail silently into a stuck state.

src/cli/work.rs is frozen at the LOC gate's 2100-line limit, so the new
duplicate-PR logic and its tests live in their own included files
(work_duplicate_pr.rs, work_duplicate_pr_tests.rs) rather than growing
work.rs itself.

Agentflare-Agent: claude-code
Agentflare-Branch: task/164-dispatch-preflight-validation
Agentflare-Item: 164

* fix review findings: duplicate-PR selection, claim/completion error handling, smoke-test ordering

Addresses 6 CodeRabbit findings on PR #596, all independently verified
against the actual code before fixing:

- pick_duplicate_pr: a closed-but-unmerged PR was treated the same as a
  genuinely open one, permanently blocking a legitimate redispatch.
  Now filters to merged-or-open only.
- handle_duplicate_pr: a failed/unconfirmed mark_completed was silently
  reported as success (comment posted, claim released, exit 0). Now
  returns a retryable failure and leaves the claim armed instead.
- handle_duplicate_pr: item_release's result was discarded and
  claim_guard was disarmed unconditionally, so a failed release left
  nothing to retry it. Now only disarms on confirmed release success.
- dashboard::server::run: engine().recover() ran before the workflow-store
  smoke test, so a broken store could still be touched by recovery before
  validation. Reordered so recovery is gated behind the smoke test too.
- dev_install::verify_workflow_store: used a blocking Command::status()
  with no timeout, unlike its sibling verify_runs. Now uses the same
  spawn/try_wait/kill-with-deadline pattern.
- github::pulls::find_by_item_marker: the search API call was
  unpaginated (GitHub's default page size is 30), so a matching PR
  beyond the first page would silently not be found. Now uses the
  existing get_paginated helper.

Also fixes the schema-mismatch regression test in sqlite_store.rs: it
put the intentional id/run_id mismatch on workflow_runs itself, so
write_state failed on save and delete_state's own failure path was
never actually exercised. Moved the mismatch to journal (write_state
never touches it for an empty smoke-test state) and strengthened the
assertion to confirm the failure comes from there.

New tests: pick_duplicate_pr_ignores_a_closed_unmerged_pr,
pick_duplicate_pr_selects_a_genuinely_open_pr_when_no_merged_match_exists.

Verified: cargo build, cargo test --bin agentflare (1548/1548 passing),
cargo test -p flare-workflow (all passing), cargo fmt --check, cargo
clippy (CI's exact flags), scripts/loc-gate.sh.

Agentflare-Agent: claude-code
Agentflare-Branch: task/164-dispatch-preflight-validation
Agentflare-Item: 164

* fix: gate work dispatch on successful pipeline registration/recovery

engine().register_workflow()/recover() failures were only logged --
the worker pool and both supervisor ticks still started regardless,
undermining the smoke-test gate's own fail-closed contract one level
up: dispatch could start against pipeline state that's already known
to be broken.

Also fixes a compile error from the prior commit: recover() returns
Result<Vec<WorkflowRunId>, WorkflowError>, not Result<(), _>.

Agentflare-Agent: claude-code
Agentflare-Branch: task/164-dispatch-preflight-validation
Agentflare-Item: 164

---------

Co-authored-by: shiva <shiva@gosysinfo.tech>
getappz pushed a commit that referenced this pull request Aug 25, 2026
…etry forever

DISPATCH_FAILURE_CAP only trips after 3 consecutive dispatch cycles with an
identical failure reason. An item whose job fails for a mix of different
reasons -- or orphans (daemon restart mid-job) and posts no failure marker
at all -- resets that streak every time, so the cap can never trip. Item
#164 hit 400+ dispatch cycles this way, only 2 of which ever landed on the
identical-reason cap.

Add a looser DISPATCH_FAILURE_CAP_ANY_REASON (6) that counts consecutive
non-success dispatch cycles regardless of reason, including unrecorded
(orphaned) ones. Wire it into handle_terminal_job_failure (clean-failure
path) alongside the existing identical-reason check, and into
restore_ready_for_work (the orphan-restart path in reconcile_orphaned_jobs,
which previously never applied any cap at all) so a job that keeps orphaning
across repeated daemon restarts also eventually lands on
needs-manual-dispatch instead of being unconditionally resurrected.

Split orphan_reconcile.rs's test module out to orphan_reconcile_tests.rs
(included via include!, mirroring cli::work's work_duplicate_pr_tests.rs
split) to stay under the LOC gate after the new coverage.

Agentflare-Agent: claude-code
Agentflare-Branch: fix/dispatch-failure-ceiling-any-reason
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tech-debt Internal refactoring / cleanup, no user-facing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable cargo publish and binstall publish

1 participant