Skip to content

Needs attention: keep a list of what needs a person and notify on the Mac #58

Closed

Description

@tomkaczocha

Outcome

When the factory needs a person, it says so on this Mac at once and keeps a list of what is open, instead of leaving it in the ledger and the log.

Acceptance criteria

  • An Attention service in apps/server/src/factory/ keeps the open attention items. Each item has an id, kind, repo, issue (or none), run (or none), message and first-seen time. These raise an item:
    • every attention event the pass writes to the ledger;
    • a run that enters stuck or needs-info;
    • a machine config that fails to load;
    • a pass that errors three times in a row.
  • Every way in has a way out. An item clears when its condition clears:
    • the run leaves stuck or needs-info, or is stopped or abandoned;
    • the config loads;
    • a pass succeeds;
    • the repo leaves the config.
    • A test proves each clear.
  • A new item posts one macOS notification. The notification names the repo and issue (or "factory"), and clicking it opens the issue URL or, for a machine item, nothing. An item that stays open is never notified again, including across a server restart: open items are kept in <base>/factory/attention.json. A test proves no repeat after restart.
  • The notification goes through process.ts, running osascript with the text passed as argv (on run argv). The text is never placed inside the AppleScript source. A test with an issue title containing quotes, backslashes and " & do shell script " proves the argv form.
  • notify: false in the machine config turns the notification off and keeps the list. A missing osascript (not macOS) logs once and does not fail the pass.
  • Attention.list() is a service method, so Factory HTTP API for status, runs and control #27's API, Factory page in the T3 web app #28's page and the mobile and remote work can read it without handler code.

Depends on

None.

Notes

  • stuck and needs-info already comment on the GitHub issue, and so reach GitHub notifications. Machine items (config, pass errors) have no surface at all today, which is the main gap.
  • The Factory page shows the list and a count badge on its nav link. That criterion is added to Factory page in the T3 web app #28.
  • Port the wording of softfac's ATTENTION lines where the same condition exists (rawphp/softfac@bf273a1, docs/lifecycle.md).

Reference

  • Design: factory/docs/design.md in this repo.
  • Upstream's AGENTS.md applies. Run only the tests and typechecks for the paths you touch (vp test run <path>, vp run --filter t3 typecheck), never the repo-wide checks.
  • Edit no upstream file that is not listed in factory/SEAMS. A new seam needs a line in factory/SEAMS and a reason in the PR body.

Activity

  1. added and removed
    factory:proposedA bot filed it; ignored until a person sets ready
    on Oct 16, 2026
  2. added and removed on Oct 16, 2026
  3. self-assigned this
    on Oct 16, 2026
  4. added and removed on Oct 16, 2026
  5. rawphp commented on Oct 16, 2026

    @rawphp

    Factory status: pr-open

  6. added
    factory:pr-openPR is open and passed the gate
    and removed on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

factory:pr-openPR is open and passed the gate

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions