@capagents/forgeqe 2.3.3 → 2.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/HOW_TO_USE.md CHANGED
@@ -115,6 +115,7 @@ Everything ForgeQE can do, by area. ForgeQE's agent answers "can you…?" questi
115
115
  | Quality | **Defect intelligence: trends and prediction**: Groups failures into defects, keeps their history across suites (new, known, gone, back again), and gives defect trends and where a change is likely to cause defects, with the cases to run first. | `defect_trends`, `predict_defects` | [docs](#bugs-for-failures) |
116
116
  | Release | **Requirement coverage and release readiness**: Gives requirement coverage and a GO / GO WITH RISKS / NO-GO verdict for a sprint, area, epic, or stories, from test cases, results, bugs, and flaky tests; can publish it to the wiki. | `release_readiness` | [docs](#requirement-coverage-and-release-readiness) |
117
117
  | Operations | **Scheduled monitoring with alerts**: Runs checks on a schedule and alerts Teams or email when one keeps failing, and again when it recovers. | `monitor` | [docs](#9-monitoring) |
118
+ | Operations | **Background jobs on a schedule**: Runs ForgeQE commands (suites, monitor rounds, regression packs, healing, pull-request tests, browser goals) on a schedule or once in the jobs service, apart from the conversation and after it closes, and watches an existing GitHub Actions or Azure DevOps pipeline (read-only). A failed pipeline run or pack run is investigated: the healing agent works on each failure on a local branch of its own (a fix for review, or an app bug), never pushing. Says how each job goes when asked, shows runs as they end, and sends failures, recoveries and findings to Teams or email. | `jobs` | [docs](#the-jobs-service-scheduled-and-long-jobs-apart-from-the-shell) |
118
119
  | Operations | **Teams and email notifications**: Tells the team in Microsoft Teams channels or by email when a suite fails or passes, when a release readiness verdict is in, and when the domain evaluation falls below its gate, with the failing cases, their bugs, and links to the report and the CI build. Each channel picks its events; the agent also posts a summary to a channel when asked. | `notify` | [docs](#17-notifications) |
119
120
  | Release | **Reports you can share**: Writes up what the Orchestrator found, such as open defects across projects, release status, or pipeline health, as a page with filters (project, state, priority, assignee, …), charts, and a sortable table, plus Markdown and CSV. Every table is built from evidence: the results of the tool calls the agent made, or a read-only query ForgeQE runs itself, listed on the page's Sources with each raw result kept beside the report. | `write_report` | [docs](#reports-from-the-agent) |
120
121
  | Operations | **CI pipelines**: Writes a GitHub Actions or Azure Pipelines workflow that runs ForgeQE, stores the secrets it needs, pushes a branch, and makes the pipeline green. | `push_branch`, `set_ci_secret` | [docs](#8-pipelines) |
@@ -371,6 +372,7 @@ GitHub Models, which ForgeQE used for the engine before, was [retired by GitHub]
371
372
  | `Model for agent: main, because copilot failed its live check …` | ForgeQE used your other model because Copilot did not answer; the message ends with the fix. |
372
373
  | The model is refused, or not found | The seat's plan or your organization's Copilot policies do not allow that model: pick one the sign-in listed, or ask a Copilot admin to enable it. |
373
374
  | `GitHub Copilot runs through the ForgeQE engine, which is not set up` (or `could not be set up (…)`) | Run `forgeqe setup`; the reason in brackets says what failed. |
375
+ | Copilot is slow, or a run waits on it ("Starting the browser…", "working out the first step…") | `~/.forgeqe/logs/copilot-gateway.log` has a line for each Copilot request: when it started, Copilot's session, when each turn ended, and how long it took. It never holds prompts, replies or tokens. A turn that ends without Copilot saying it is idle (a known Copilot SDK issue) is answered 5 seconds later instead of after the 5-minute limit, and a session the run no longer needs (Stop, an error) is stopped. |
374
376
  | `CERTIFICATE_VERIFY_FAILED` while downloading Copilot's runtime | Your network inspects HTTPS. Update ForgeQE and run `forgeqe setup`, then sign in again: it uses the certificates your computer trusts (see [Company networks](#company-networks)). If it still fails, run `forgeqe doctor` and send its output to IT. |
375
377
 
376
378
  ### Your prompts, skills, and product knowledge
@@ -2582,6 +2584,51 @@ Monitoring checks/smoke.yaml every 15m · replay verify · alerts: Teams, email
2582
2584
 
2583
2585
  You can also ask ForgeQE's agent. In the shell, "check the smoke cases once" runs one round and shows it as a card, and "monitor the smoke cases every 10 minutes" starts a monitor in the background: you keep working, each round appears as a card, "is anything failing?" shows the state, and "stop monitoring" ends it. A background monitor lives as long as the shell (or `forgeqe mcp`) and stops when it closes; `forgeqe run` refuses to start one, because it would stop when the command exits. While one is running, a one-off round on the same `out_dir` is refused rather than run twice. For monitoring that keeps going after you close the shell, "monitor the smoke cases every 10 minutes and alert the QA channel in Teams, always on" makes the agent set up `monitor:` in `forgeqe.yaml`, send a test alert, and tell you how to keep `forgeqe monitor` running (or add a scheduled pipeline).
2584
2586
 
2587
+ ### The jobs service: scheduled and long jobs apart from the shell
2588
+
2589
+ `forgeqe jobs` runs ForgeQE commands on a schedule, or once, in a service of their own, so they keep going while you work on something else in the shell, or with the shell closed. Each run is its own `forgeqe` process with its own output and session log; you ask how a job is going at any time, and its failures and recoveries go to Teams.
2590
+
2591
+ ```bash
2592
+ forgeqe jobs add nightly-pack --cron "0 2 * * 1-5" -- pack run release-2.3 # weekdays at 02:00, this machine's time
2593
+ forgeqe jobs add smoke --every 30m -- suite checks/smoke.yaml
2594
+ forgeqe jobs add heal-login --now -- heal --focus login # once, now
2595
+ forgeqe jobs # every job: running or how its last run ended, and when it runs next
2596
+ forgeqe jobs status nightly-pack # its last runs, and the last lines of the latest
2597
+ forgeqe jobs logs nightly-pack --tail 100
2598
+ forgeqe jobs run nightly-pack # run it now as well
2599
+ forgeqe jobs stop nightly-pack # stop the run that is going
2600
+ forgeqe jobs disable|enable|remove nightly-pack
2601
+ forgeqe jobs shutdown # stop the service; scheduled jobs wait until it starts again
2602
+ ```
2603
+
2604
+ - **What a job runs.** One ForgeQE command: `suite`, `monitor`, `run`, `heal`, `pr-tests`, `pack run`, `pack triage` or `pipeline watch`, with its arguments after `--`. Nobody is there to answer a question while a job runs, so a `run` job is a browser run of the goal (`--direct`), and a `pack run` job carries `--yes`: adding the job is your approval, and the command you agree to shows it. It runs with the project's own `forgeqe.yaml`, model profile and approvals: a job cannot set `--config`, `--profile` or `--yes`, and nothing else is started (no shell, no other program). A `monitor` job runs one round each time it is due (`--once`), on the job's schedule; it sends its own `monitor.alerts`, so its job is quiet unless you add it with notices on.
2605
+ - **When.** `--every 15m` (at least 1m), `--cron "0 2 * * 1-5"` (minute hour day month weekday, local time), or neither: it runs when asked, and `add` starts it at once. `--now` also runs a scheduled job straight away. A run missed while the service was down starts once when it is back. When several are due, the one that has waited longest goes first.
2606
+ - **How many.** `jobs.parallel` in `forgeqe.yaml` (default 2) runs at once over all jobs, and never two runs of one job. A run past `--timeout` (default 6h, at most 24h) is stopped and marked timed out.
2607
+ - **The service.** `forgeqe jobs add` and `forgeqe jobs run` start it when it is not running, as a process of its own that outlives the command and the shell; `forgeqe jobs serve` runs it in the foreground (for a container or a system service). It is one per project, on this machine, until you stop it or the machine restarts. It listens on 127.0.0.1 only, with a random token kept in your own ForgeQE folder (`~/.forgeqe/jobs/`, readable by your user only, never in the project, which others may read), and refuses requests from web pages. A second service for the same project is refused. `.forgeqe/jobs/` and `.forgeqe/pipelines/` get their own `.gitignore`, so runs and logs are never committed.
2608
+ - **Files.** `.forgeqe/jobs/<job>/job.json` and, for each of its last 50 runs, `runs/<run>/run.json` and `output.log`; `.forgeqe/jobs/events.jsonl` lists what happened; `.forgeqe/jobs/service.log` is the service's own output. A run that was going when the service stopped is marked interrupted.
2609
+ - **Watching a CI pipeline.** `forgeqe jobs add ci --every 10m -- pipeline watch --github org/app --workflow ci.yml --branch main` (or `--ado-project Shop --pipeline 12`) looks at the pipeline's latest completed run each time, read-only: it starts, re-runs and changes nothing. A new failed run is triaged like a pack's (the JUnit or TRX files in its artifacts on GitHub, the Test Runs API on Azure DevOps; without results, the job and step that failed), in `.forgeqe/reports/pipelines/`. The job fails while the latest run is failed, so the team hears once when the pipeline breaks and once when it is green again; a cancelled run changes nothing. `forgeqe pipeline watch …` on its own does one look. GitHub needs the `gh` CLI signed in; Azure DevOps the same sign-in as the rest of ForgeQE.
2610
+ - **Investigating failures.** When a `pipeline watch` or `pack run` job fails, the failures that healing can decide (an element not found, an expected value that does not hold; not the environment, flaky tests or broken test code, and nothing while the environment is down) are investigated, at most 3 a run, `jobs.parallel` at once. Each goes to the healing agent in a git worktree of its own, on a new local branch `forgeqe/investigate/<test>-<time>-<n>`, from the commit the failing run tested when this clone has it (fetched when it can be, else `HEAD`, which the finding says). The agent re-runs the flow in the browser: when the flow works it heals the test, and the fix is committed on that branch for you to review; when the browser fails at the same step it is an app bug, and no branch is kept. Your checkout, its branch and its files are never touched; nothing is pushed or merged; the worktree is removed at the end. `node_modules`, `.venv` and `venv` from your checkout are linked into the worktree so the tests can run, and never committed. The failure is told at once (`job_failed`), the findings when they are in (`job_investigated`); `forgeqe jobs status` lists them, `.forgeqe/jobs/<job>/runs/<run>/investigations.json` and `investigate.log` have the detail, and `forgeqe investigate <run folder>` runs an investigation by hand. `--no-investigate` turns it off for a job.
2611
+ - **From the shell.** Ask ForgeQE's agent: "run the release-2.3 pack every weekday at 2am in the background" makes it propose the job, and ForgeQE asks you to agree to its exact command and schedule before adding it (**Add the job** / **Don't add it**). You keep working; when a job's run ends, a line says so in the conversation ("Job nightly-pack failed: …"), and "how are my jobs?" or "show the end of the nightly-pack log" get answers from the service. The agent adds a job only when you ask for one, and never one that runs anything but the commands above.
2612
+ - **Notices.** With `notify:` channels set up (section 17), a job that fails sends `job_failed` once (not every run while it keeps failing), `job_recovered` when it passes again, and a job that runs only when asked sends `job_done` when it ends. `--no-notify` keeps a job quiet.
2613
+
2614
+ ```yaml
2615
+ jobs:
2616
+ parallel: 2
2617
+ ```
2618
+
2619
+ **On company machines.** Nothing here needs administrator rights:
2620
+
2621
+ | What | Needs |
2622
+ |---|---|
2623
+ | The jobs service | Runs as you, in your project and your ForgeQE folder. It listens on 127.0.0.1 only, so no firewall rule is needed. Endpoint security may see a background `bun` process: it is ForgeQE's own (in its install folder), which IT can allow. Jobs pause while the machine sleeps or is off and a missed run starts once when it is back; for always-on jobs, run `forgeqe jobs serve` on a VM or build agent under its service manager (systemd, a Windows Task Scheduler task "at log on", which needs no administrator, or a container). |
2624
+ | `pipeline watch` on GitHub | The `gh` CLI signed in (`gh auth login`) with read access to the repository's Actions. A fine-grained token needs Actions: read and Contents: read; with SAML single sign-on, authorize the token for the organization. GitHub Enterprise Server: `--github host/owner/repo` and `gh auth login --hostname host`. |
2625
+ | `pipeline watch` on Azure DevOps | The Azure DevOps sign-in ForgeQE already uses (`forgeqe auth login azure_devops`, or a token in `ADO_PAT`) with Build: read and Test Management: read. Azure DevOps Server works through its collection URL. |
2626
+ | Investigating failures | git, read access to fetch the failing commit, the tests' dependencies installed in your checkout, and a model: a key-based profile, or GitHub Copilot where the organization's policy allows Copilot CLI and the SDK. Branches are local; nothing is pushed. |
2627
+ | Teams notices | A Workflows webhook ("post to a channel when a webhook request is received"), or an incoming webhook where the tenant still allows them; where neither is allowed, email. |
2628
+ | Proxy and inspected HTTPS | The same as the rest of ForgeQE (section "Company networks"); `gh` uses `HTTPS_PROXY`. `forgeqe doctor` checks the machine and the network. |
2629
+
2630
+ On Windows, the dependency folders are linked into worktrees as junctions (no administrator or developer mode needed), a stopped run ends at once rather than being asked to finish, and the token file is protected by your user profile's permissions.
2631
+
2585
2632
  ## 10. MCP
2586
2633
 
2587
2634
  ### Servers ForgeQE's agent connects to
@@ -3030,8 +3077,12 @@ notify:
3030
3077
  | `suite_passed` | Every case passed | The count, how long it took, where it ran |
3031
3078
  | `release` | A release readiness verdict | GO, GO WITH RISKS, or NO-GO, the counts, every blocker and risk, and the wiki page when published |
3032
3079
  | `eval_failed` | `forgeqe eval domain --min` falls below its gate | Coverage for each variant and invented ids |
3080
+ | `job_failed` | A job of the jobs service fails or runs out of time, after passing or for the first time (not again while it keeps failing) | The job, its command and schedule, how long it ran, its last lines of output, and where its output is |
3081
+ | `job_recovered` | A job passes again after failing | The same, for the run that passed |
3082
+ | `job_done` | A job that runs only when asked ends | The same, whether it passed or failed |
3083
+ | `job_investigated` | The investigation of a job's failed run is done | Each failure: a test out of date with its fix on a branch, an app bug, or not decided, with the agent's reasons |
3033
3084
 
3034
- A channel without `on` gets `suite_failed`, `release`, and `eval_failed`. Email adds the failure screenshots. A stopped suite is not announced. Monitoring keeps its own `monitor.alerts`, with the same cards.
3085
+ A channel without `on` gets `suite_failed`, `release`, `eval_failed`, `job_failed`, `job_recovered`, and `job_investigated`. Email adds the failure screenshots. A stopped suite is not announced. Monitoring keeps its own `monitor.alerts`, with the same cards.
3035
3086
 
3036
3087
  Events are sent from runs nobody is watching: `forgeqe suite` in a pipeline or on a schedule, `forgeqe run`, and the MCP server. In the shell, where people try things out, nothing is sent on its own; ask instead ("post the results to the QA channel", "tell the release channel the verdict"), and ForgeQE's agent posts a card with `notify`.
3037
3088