Repository navigation
Conversation
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
Design Review (Opus 5.5) — 🔴 BLOCK (blocking)Design-level review of Design-Verdict: BLOCK No one has run this on a Mac. The macOS-only probe now decides BlockersmacOS-only branch has no manual verification
[DESIGN-REVIEWED] b2ed600 Description read[DESCRIPTION-READ] cf63eae2c3ad49258b613881548ec54d374841c10aebbd5c08392c0b010a9389 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The macOS Not justified as shipped
What this change shipsInventory (5 items) — 4 justifiedIntent: On a Mac, see a serving gateway LaunchAgent as running, not "not loaded". FIX.
[FIRST-PRINCIPLES-REVIEWED] b2ed600 Description read[DESCRIPTION-READ] cab04fb5afa7937ca5b372b372cdf49cd263f883f5b7b4a7e9a7cc68f45e05ef That sha256 names the PR description this verdict read. Recompute it with |
7db57b4 to
5596730
Compare
4c166b9 to
60903db
Compare
60903db to
1af33d4
Compare
|
Per-concern dispositions for the two advisory (CONCERNS) verdicts on Design Review, concern 1 (no live launchd ran this revision):
Design Review, concern 2 (stop() newly reachable with a legacy unload):
First Principles, item 4 (last-exit regex duplicates pod/launchd.py):
First Principles, item 5 (stdout-reason fallback rests on an unverified claim):
First Principles, inventory items 3 and 7 (terse summary and the restart-paragraph doc fix ride along):
|
1af33d4 to
fe99ea9
Compare
|
🤖 Kiro Crew [operator: dwu96#8c08bee0]: This PR has been inactive for 7+ days. I reviewed the blockers but they require your input:
When you've addressed these, the pipeline will re-assess on its next cycle. |
|
PR triage (2026-10-05): KEEP + REBASE Checked the full diff against
|
fe99ea9 to
c169eae
Compare
|
UX Review (Opus 5.5) — ⏭️ skippedRevision |
c169eae to
07be2c5
Compare
|
self-added: yes
|
|
self-added: yes
|
|
|
|
Correction to my earlier Design disposition for fe99ea9: the live-launchd test module it cited is deleted at 07be2c5 (the root conftest host-service guard forbids tests that bootstrap real agents outside the opt-in e2e suites), and ci:macos is removed. The probe now covers gui/ and user/, so the user/ gap is closed in code. A real-Mac transcript of |
is_active() and status() used `launchctl list <label>`, which reads only the caller's domain and can exit non-zero with empty output for a serving gui/<uid> agent, so `kirocrew service status` called a running gateway "not loaded". Both now probe `launchctl print <domain>/<label>` over gui/<uid> then user/<uid>, the same domains install, stop and restart address since #17492. status() renders a terse summary (domain, state, pid, non-zero last exit, plist path). `service status` exits on a new is_up() (state = running), so a crash-looping agent exits 1 as on Linux, while is_active() keeps loaded-counts-as-active for reach. Closes #11002 Co-authored-by: Di Wu <dwu96@users.noreply.github.com>
07be2c5 to
b2ed600
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Requesting changes on head b2ed600. Design Review is red with a BLOCK on this head. The CI log says: "Design review verdict for b2ed600: BLOCK".
The design concern: the description says manual verification was not run on a Mac, yet the macOS-only probe now decides the exit code of service status and the result of is_service_active(), which gates server restart. The new tests feed in hand-written launchctl print output, so nothing checks which domain answers launchctl print gui/<uid>/<label> from a desktop session and from SSH, or how the first state = running line looks in real output. If real output differs, Mac users would keep seeing a running gateway reported as down, which is the symptom this PR sets out to fix.
Could you, or a macOS user, run the new probe on a real Mac (desktop session and SSH), paste the real launchctl print output and the service status result into the description, and use that output as a test fixture? Please also update the branch onto main when you push, since these runs are about two weeks old.
Problem / Motivation
Goal: On macOS,
kirocrew service statusand everyis_active()caller see the gateway LaunchAgent while it is serving, instead of reporting "kirocrew service is not loaded (no entry)".is_active()andstatus()probed withlaunchctl list <label>. That legacy form reads only the caller's domain, and for the gateway'sgui/<uid>agent it exits non-zero with empty output whilelaunchctl print gui/<uid>/<label>answers for the same label at the same moment (the reporter's measured rc pair in #11002). The "(no entry)" text is the empty-stderr fallback.Why it matters
service statusexits 1 andis_service_active()returns False for a running gateway, so anyone diagnosing a Mac gateway is told it is down, and any caller gated on that bit takes the no-service path.Not a goal
install,stop,restart,uninstall). fix(service): address launchd gui/<uid> domain explicitly in install and stop #17492 already moved them to domain-explicitbootstrap/bootout/kickstartovergui/<uid>thenuser/<uid>.restart_service()/stop_service()gates are: they keepis_loaded()/stop()from fix(service): address launchd gui/<uid> domain explicitly in install and stop #17492.What changed (motivation → approach → change)
Symptom: a serving gateway reads as not loaded. Root cause: the probes address the job by a different form (caller-domain
list) than the verbs that act on it (namedgui/<uid>thenuser/<uid>, since #17492). Fix: the probes use the same domains.macos._probe()runslaunchctl print <domain>/<label>over_legacy_domains()(gui/<uid>, thenuser/<uid>) and returns the first domain that answers rc 0. With none, it keeps the most telling refusal: a refusal other than "not found" /125wins.is_active(): true when any domain answers rc 0, including loaded-but-not-running (thelist-era contract). Any non-zero answer is inactive, unlikeis_loaded(), which reads an unclear answer as loaded.is_up()(new): true only forstate = running.controller.service_status()exits on it, matching Linux'sis_up(): a crash-looping agent (loaded, not running) exits 1, whileis_active()keeps it reachable tostop.status(): a terse summary instead of the ~3 KBprintdump:<label>: <state> (<domain>),pid,last exitwhen non-zero and numeric,plist. Not loaded keeps the old message; its reason falls back to stdout's first line, thenno entry.macos.py, comments incontroller.py, anddocs/system-specs/modules/cli.mdno longer say the probes read the caller's domain.Since the first revision of this PR: rebased over #17492,
_target()dropped for main's_legacy_domains(), and the probe now also finds auser/<uid>job, which closes the gap the Design Review named.Backwards compatibility
Breaking:
kirocrew service statuson macOS now exits 1 for a loaded-but-not-running agent (thelistprobe exited 0 when the PID key was absent). Writer sweep on origin/main @ 2cf3d0d: the exit code is read only bycli_server'sservice statussubcommand (returned as the process exit) and by scripts; no in-repo caller gates on it.is_service_active(),stop_service()andrestart_service()do not useis_up().Reader: src/kiro_crew/service/controller.py:service_status -- entry: release (CLI
kirocrew service status) -- exits onmacos.is_up(); test_service_status_exit_follows_running_not_loadedReader: src/kiro_crew/service/controller.py:is_service_active -- entry: release -- still
macos.is_active()(loaded counts); test_status_and_is_active_see_the_gui_job_from_any_sessionTests
test/test_service_macos_control.py: fixtures migrated fromlist-shaped toprint-shaped output. New: argv-discriminating probe tests (onlyprint gui/<uid>/<label>answers, every other spelling fails empty, as reported), terse summary,last exitboth spellings, numeric gate (0,-15,--78, superscripts), stdout reason fallback,no entryfallback.test/test_service_macos_control.pyalso pins the exit-code split:running->is_upTrue, exit 0;not running->is_activeTrue,is_upFalse, exit 1; nothing loaded ->is_upFalse.test/test_service_controller.py's two macOS status tests now patchis_up.test/test_service_macos_launchd_domain.py(stateful launchctl stand-in from fix(service): address launchd gui/<uid> domain explicitly in install and stop #17492):status/is_active/service_status()see the gui job from a desktop and an SSH session; follow a no-desktop install intouser/<uid>; see a legacyuser/<uid>job from the desktop; nothing loaded reads inactive with the not-found reason, with and without a desktop; a real gui refusal is shown over a later user "not found".test_kirocrew_stop_from_ssh_boots_out_the_gui_jobno longer pins the old miss.macos.py.prove.py: PROVEN.-n0, 10/10 at-n 4 --dist loadgroup --max-worker-restart=2withtest_service.pyandtest_service_controller.pyas co-tenants, shuffled order (seed 11016, 132 ids) green.origin/mainworktree on this host (test_cli.pydoctor,test_cli_gateway_boot.py,test_terminal_handler.py,test_xdist_escaped_failure_guard.py), none in service code.Manual verification
Not run on a Mac: this host is Linux. The
printfield spellings parsed (state,pid,path,last exit code/last exit status) and the rc semantics are the onespod/launchd.pyalready parses on main; the reporter's measuredlistrc=1 /printrc=0 pair (#11002) is the live evidence. A live-launchd test was tried and dropped: the root conftest's host-service guard forbids tests that bootstrap real agents outside the opt-in e2e suites.Related Issues
Closes #11002
Pattern harvest
Rule candidate: review-prompt
Pattern: a probe that addresses a service by a different form (caller-domain
launchctl list) than the verbs acting on it (named<domain>/<label>) diverges on any host where the two resolve differently; probes must address the job the way its actuators do.Checklist