Skip to content

fix(index): report unwired generation execution honestly (#174) - #223

Merged
waterbro-8 merged 1 commit into
bytefolk:mainfrom
sun-970:fix/174-honest-execution-20260920
Sep 22, 2026
Merged

waterbro-8 merged 1 commit into
bytefolk:mainfrom
sun-970:fix/174-honest-execution-20260920

Conversation

@sun-970

@sun-970 sun-970 commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Tracking record

Refs #174. Smallest resolution. Successor to dirty/unmerged #189, rebased onto current main (minus the #222 workflow-scope bump on the fork).

Summary

Index-generation HTTP still advertised execution_wired: true with no worker claiming targets. This PR makes the flag honest and fail-closed:

  • execution_wired: false on list/status/events/cancel/resume/discard
  • create / activate / rollback return 503 execution_unavailable and never call Service.Create / Activate / Rollback
  • create still returns 400 for malformed JSON or empty profile_id
  • empty-workspace activate is refused by the same 503
  • docs/INDEX_GENERATIONS.md matches the routes that exist
  • tests assert the flag key is present and false (map[string]any, not a bool zero value)

Does not implement a worker executor (ClaimTarget loop). No follow-up executor issue exists yet; that remains deferred.

Validation ledger

ID Criterion Command Result
V1 Flag vs capability; create/activate/rollback 503; empty activate refused go test ./internal/api/ -run 'TestIndexGeneration|TestExecutionWired|TestEmptyWorkspace' PASS
V2 Whitespace git diff --check PASS

Risk / rollback

Read-only status remains. Mutating create/activate/rollback become actionable 503s instead of stuck or empty-active generations. Revert restores the old advertisement.

@sun-970

sun-970 commented Sep 20, 2026

Copy link
Copy Markdown
Contributor Author

@waterbro-8 please review. Fork PR; I cannot request reviewers on this repo.

@waterbro-8 waterbro-8 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Code review APPROVE (not product 验收).

Fail-closed matches #174: execution_wired: false on list/status/events/cancel/resume/discard; create/activate/rollback return 503 execution_unavailable without calling Service.Create/Activate/Rollback; create still 400s malformed JSON / empty profile_id first; tests assert the flag key is present and false.

Please rebase onto current main (includes #222) — GitHub mergeStateStatus is BEHIND. After rebase I will not re-approve unless the diff changes.

@sun-970

sun-970 commented Sep 20, 2026

Copy link
Copy Markdown
Contributor Author

Rebased locally onto current main 7b8bad3 (#222). One commit, no conflicts.

Cannot push from this OAuth token: GitHub rejects updating .github/workflows/mcp-registry-publish.yml without workflow scope (the file lands because #222 is on main). maintainer_can_modify is on — please rebase from your side (or merge through main).

Local rebased heads:

@sun-970

sun-970 commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

Tried again to unstick the behind-by-1 vs main 7b8bad3 (#222).

POST /repos/sun-970/mem/merge-upstream (branch=main) was rejected:

HTTP 422
refusing to allow an OAuth App to create or update workflow `.github/workflows/mcp-registry-publish.yml` without `workflow` scope
documentation_url: https://docs.github.com/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository

Local rebase onto current main is clean (one commit, no conflicts). Did not rewrite or push the feature commit — this OAuth token still lacks workflow scope, so any push that introduces the #222 workflow files is refused.

maintainer_can_modify is on. @waterbro-8 can rebase this branch (or merge through main) from the GitHub UI.

Local rebased heads (not pushed):

Advertise execution_wired=false and fail-closed create/activate/rollback
with 503 execution_unavailable so operators cannot enter stuck-building
or empty-workspace active states. Do not implement a worker executor.
@waterbro-8
waterbro-8 force-pushed the fix/174-honest-execution-20260920 branch from e314278 to 7c9e002 Compare September 22, 2026 12:13
@waterbro-8
waterbro-8 merged commit 3977b35 into bytefolk:main Sep 22, 2026
21 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.

2 participants