forgedock 1.59.1 → 1.60.0

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.
Files changed (94) hide show
  1. package/bin/engine/outcome-codes.mjs +3 -3
  2. package/bin/engine-cli.mjs +50 -10
  3. package/bin/labels.json +5 -0
  4. package/bin/lean/batch.mjs +21 -2
  5. package/bin/lean/batch.test.mjs +116 -1
  6. package/bin/lean/conformance.mjs +12 -5
  7. package/bin/lean/conformance.test.mjs +30 -2
  8. package/bin/lean/depcache.mjs +34 -15
  9. package/bin/lean/depcache.test.mjs +100 -1
  10. package/bin/lean/design-gate.mjs +15 -10
  11. package/bin/lean/design-gate.test.mjs +21 -0
  12. package/bin/lean/effects.mjs +18 -2
  13. package/bin/lean/execution.mjs +23 -5
  14. package/bin/lean/execution.test.mjs +81 -1
  15. package/bin/lean/gatewatch.test.mjs +5 -5
  16. package/bin/lean/issuewatch-triage.mjs +68 -0
  17. package/bin/lean/issuewatch-triage.test.mjs +98 -0
  18. package/bin/lean/issuewatch.mjs +34 -6
  19. package/bin/lean/issuewatch.test.mjs +11 -0
  20. package/bin/lean/lanelock.mjs +5 -4
  21. package/bin/lean/lean.mjs +123 -17
  22. package/bin/lean/lean.test.mjs +154 -6
  23. package/bin/lean/orchestrate-cancel.test.mjs +33 -0
  24. package/bin/lean/orchestrate-hostfallback.test.mjs +41 -0
  25. package/bin/lean/orchestrate-recovering.test.mjs +42 -0
  26. package/bin/lean/orchestrate.mjs +23 -10
  27. package/bin/lean/pagegate.mjs +50 -12
  28. package/bin/lean/pagegate.test.mjs +38 -1
  29. package/bin/lean/phaseledger.mjs +65 -2
  30. package/bin/lean/phaseledger.test.mjs +70 -2
  31. package/bin/lean/preflight.mjs +5 -2
  32. package/bin/lean/preflight.test.mjs +7 -0
  33. package/bin/lean/prompts.mjs +2 -1
  34. package/bin/lean/recovery.test.mjs +11 -6
  35. package/bin/lean/release-classify.mjs +143 -0
  36. package/bin/lean/release-classify.test.mjs +130 -0
  37. package/bin/lean/release-conductor.mjs +163 -0
  38. package/bin/lean/release-conductor.test.mjs +194 -0
  39. package/bin/lean/release-config.mjs +60 -8
  40. package/bin/lean/release-config.test.mjs +43 -1
  41. package/bin/lean/release-control.mjs +22 -5
  42. package/bin/lean/release-control.test.mjs +22 -0
  43. package/bin/lean/release-credentials.mjs +40 -0
  44. package/bin/lean/release-credentials.test.mjs +42 -0
  45. package/bin/lean/release-deploy.mjs +3 -3
  46. package/bin/lean/release-deploy.test.mjs +8 -0
  47. package/bin/lean/release-docs.test.mjs +93 -0
  48. package/bin/lean/release-fence.mjs +2 -0
  49. package/bin/lean/release-gate.mjs +88 -0
  50. package/bin/lean/release-gate.test.mjs +116 -0
  51. package/bin/lean/release-gates.mjs +5 -1
  52. package/bin/lean/release-ledger.mjs +47 -1
  53. package/bin/lean/release-ledger.test.mjs +33 -1
  54. package/bin/lean/release-mergeback.mjs +148 -0
  55. package/bin/lean/release-mergeback.test.mjs +129 -0
  56. package/bin/lean/release-p0.mjs +193 -0
  57. package/bin/lean/release-p0.test.mjs +127 -0
  58. package/bin/lean/release-plan.mjs +267 -0
  59. package/bin/lean/release-plan.test.mjs +202 -0
  60. package/bin/lean/release-preflight.mjs +16 -0
  61. package/bin/lean/release-regate.mjs +141 -0
  62. package/bin/lean/release-regate.test.mjs +149 -0
  63. package/bin/lean/release-review.mjs +5 -3
  64. package/bin/lean/release-rollback.mjs +277 -0
  65. package/bin/lean/release-rollback.test.mjs +245 -0
  66. package/bin/lean/release-snapshot.mjs +48 -9
  67. package/bin/lean/release-snapshot.test.mjs +43 -1
  68. package/bin/lean/release-start.mjs +164 -0
  69. package/bin/lean/release-start.test.mjs +171 -0
  70. package/bin/lean/release-status.mjs +6 -2
  71. package/bin/lean/release-train.mjs +159 -0
  72. package/bin/lean/release-train.test.mjs +139 -0
  73. package/bin/lean/release.mjs +127 -5
  74. package/bin/lean/release.test.mjs +80 -0
  75. package/bin/lean/sandbox-remote.mjs +2 -0
  76. package/bin/lean/schedd-load.test.mjs +82 -0
  77. package/bin/lean/schedd.mjs +67 -31
  78. package/bin/lean/schedd.test.mjs +80 -1
  79. package/bin/lean/validate-catalog.mjs +94 -0
  80. package/bin/lean/validate-catalog.test.mjs +42 -0
  81. package/bin/pool/agent.mjs +4 -1
  82. package/bin/pool/lane-tools.mjs +115 -0
  83. package/bin/pool/lane-tools.test.mjs +26 -0
  84. package/bin/pool/warm.mjs +1 -1
  85. package/docs/CONFIG.md +225 -1
  86. package/docs/ISSUE-WATCH.md +1 -0
  87. package/docs/design/visual-gate.md +10 -0
  88. package/docs/eval/adversarial-bench.md +1 -0
  89. package/package.json +5 -2
  90. package/pool/README.md +2 -0
  91. package/scripts/bench-adversarial.mjs +4 -0
  92. package/scripts/bench-lightlane.mjs +2 -1
  93. package/templates/github-actions/forge-conductor.scopes.json +7 -0
  94. package/templates/github-actions/forge-conductor.yml +57 -0
package/bin/pool/warm.mjs CHANGED
@@ -23,7 +23,7 @@ export function makeWarm({ store, sb, own, now, launch, destroy, view, log = con
23
23
  function configure({ spec, cpus, mem_gb, limit = null, n }) {
24
24
  const key = keyOf(spec), want = Math.min(MAX_WARM, Number.isInteger(n) ? n : 0);
25
25
  if (want <= 0) { delete wanted()[key]; store.save(); return { key, n: 0 }; }
26
- wanted()[key] = { n: want, cpus, mem_gb, limit, spec: { image: spec.image ?? null, repo: spec.repo ?? null, cache: spec.cache ?? null, docker: Boolean(spec.docker) } };
26
+ wanted()[key] = { n: want, cpus, mem_gb, limit, spec: { image: spec.image ?? null, repo: spec.repo ?? null, cache: spec.cache ?? null, docker: Boolean(spec.docker), ...(spec.lane_tools?.length ? { lane_tools: spec.lane_tools } : {}) } };
27
27
  store.save();
28
28
  return { key, n: want };
29
29
  }
package/docs/CONFIG.md CHANGED
@@ -758,7 +758,7 @@ gate:
758
758
 
759
759
  ## `release` (OPTIONAL)
760
760
 
761
- Settings for `forgedock release [--repo owner/repo] [--merge] [--watch] [--resume <id>]` (#5208), which runs the `branches.staging` → `branches.default` release as one resumable job. State is kept in `~/.forge/releases/<id>/` (or `FORGEDOCK_RELEASE_DIR`); `--resume <id>` continues from the last completed step (preflight, release-pr, review, fixes, promotion, post-merge). Preflight refuses while lanes of the repo run or PRs to the staging branch are open, and sets the repo's batches to K=1 until the job ends. Review and fixes are not automated yet: the job stops there and tells you to use the manual path (`commands/review-pr-staging.md`). Post-merge is automated (#5213): it confirms a publish run for the merge commit (dispatching one when none appears), waits for `artifact_check`, then opens and merges the version-sync PR; a bound that runs out stops the job as blocked and `--resume <id>` retries. `forgedock release status [<id>] [--watch] [--interval s] [--json]` (bare `forgedock release --watch` runs the same loop) and `forgedock release explain <id | #issue | PR> [--json]` (#5554) are read-only: status reads the ledger (when `release.managed`) or the local cache plus the release PR's gate; `--watch` polls until the release is done, refused or blocked. `explain #N` prints the ordered rule trace (skip labels, priority, theme_map, `Depends on`, recorded release set, each with its config key), the lane and what would change it; `explain <PR>` prints the gate decision. `--json` output has schema `forgedock.release.status/v1` or `forgedock.release.explain/v1` and `next_actions[]`, the exact commands an agent may run; output carries no host name, so another host prints the same text. `status --watch [--interval s]` prints only when the output changes and stops at a terminal state; `forgedock release --watch` runs the same loop. Status prints `unknown` for any field the ledger does not hold. `explain #N` also reads the `FORGE:CLASSIFY` record (else `classification: absent`), `plan.skip_labels`, `classify.min_confidence`, `risk.rules[i]`, `forces[i]`, prints `planner: not installed` until the planner registers, and takes the lane from the latest `lane` entry in `controls.jsonl`; `explain <PR>` lists each required check with its outcome and any demotion (actor, expiry, reason, issue). `next_actions[]` carries `hold|resume|cancel` and `lane #N --force <lane>` commands (the `release-control.mjs` verbs) with `--reason <reason>` placeholders; there is no `rollback` verb yet, so none is emitted. `explain <PR>` reads the live `_active.exemptions` records (`release exempt`), `explain #N` the `_active.lanes` records.
761
+ Settings for `forgedock release [--repo owner/repo] [--merge] [--watch] [--resume <id>]` (#5208), which runs the `branches.staging` → `branches.default` release as one resumable job. State is kept in `~/.forge/releases/<id>/` (or `FORGEDOCK_RELEASE_DIR`); `--resume <id>` continues from the last completed step (preflight, release-pr, review, fixes, promotion, post-merge). Preflight refuses while lanes of the repo run or PRs to the staging branch are open, and sets the repo's batches to K=1 until the job ends. Post-merge is automated (#5213): it confirms a publish run for the merge commit (dispatching one when none appears), waits for `artifact_check`, then opens and merges the version-sync PR; a bound that runs out stops the job as blocked and `--resume <id>` retries. `forgedock release status [<id>] [--watch] [--interval s] [--json]` (bare `forgedock release --watch` runs the same loop) and `forgedock release explain <id | #issue | PR> [--json]` (#5554) are read-only: status reads the ledger (when `release.managed`) or the local cache plus the release PR's gate; `--watch` polls until the release is done, refused or blocked. `explain #N` prints the ordered rule trace (skip labels, priority, theme_map, `Depends on`, recorded release set, each with its config key), the lane and what would change it; `explain <PR>` prints the gate decision. `--json` output has schema `forgedock.release.status/v1` or `forgedock.release.explain/v1` and `next_actions[]`, the exact commands an agent may run; output carries no host name, so another host prints the same text. `status --watch [--interval s]` prints only when the output changes and stops at a terminal state; `forgedock release --watch` runs the same loop. Status prints `unknown` for any field the ledger does not hold. `explain #N` also reads the `FORGE:CLASSIFY` record (else `classification: absent`), `plan.skip_labels`, `classify.min_confidence`, `risk.rules[i]`, `forces[i]`, prints `planner: not installed` until the planner registers, and takes the lane from the latest `lane` entry in `controls.jsonl`; `explain <PR>` lists each required check with its outcome and any demotion (actor, expiry, reason, issue). `next_actions[]` carries `hold|resume|cancel` and `lane #N --force <lane>` commands (the `release-control.mjs` verbs) with `--reason <reason>` placeholders; `rollback` and the other control verbs exist (see the CLI reference) but `next_actions[]` does not emit them. `explain <PR>` reads the live `_active.exemptions` records (`release exempt`), `explain #N` the `_active.lanes` records.
762
762
 
763
763
  ```yaml
764
764
  release:
@@ -866,6 +866,227 @@ jobs:
866
866
 
867
867
  **Commands that use this section**: `forgedock release`
868
868
 
869
+ ### Gate-only fix lane: `release control regate` (#5584)
870
+
871
+ `forgedock release control regate <release id> --ref <fix branch|sha> --reason "..." [--gate-fix-ref <hotfix branch>]` re-evaluates the gates of the same release sha (same image digests, no rebuild, no migration rerun) with the gate code of `--ref`, so a fix limited to gate artifacts does not need a new merge cycle. Nothing runs unless the verb is called. The fix still goes through CI and review once; it never skips the merge cycle for code that ships in images.
872
+
873
+ - **Classifier**: the diff between the release's merged sha and `--ref` is gate-only only when every path matches `gates.paths` (default `scripts/deploy/**`, `scripts/lib/**`, `scripts/prod-smoke-test.sh`, `**/gate-fixtures/**`, `tests/gates/**`). A `.github/workflows/*.yml` file qualifies only when every changed hunk lies in a step named in `gates.workflow_steps` (default none). A migration path (`**/migrations/**`, `**/migrate/**`, `*.sql`), an image path (`Dockerfile*`, `docker-compose*.yml`) or any other app path sends the fix to the normal lane.
874
+ - **Dispatch**: one `gh workflow run` of `verify.workflow` at `--ref` through the epoch fence, inputs `sha` (the release sha), `regate=true`, `gate_sha` and `forge_epoch`. The engine never sets `override_freeze` (I26); LIVE_CHECK (I28) still applies to the result.
875
+ - **`gate_fix_ref`** (hotfix same-release gate fix): with `--gate-fix-ref`, the dispatch also carries `gate_fix_ref=<branch>`, which lets a hotfix-branch gate fix replace the default-branch preflight copy. It is recorded in the audit line and in `state.regates`.
876
+ - **Refusals** (nothing is written or dispatched): no recorded live record/rollback target (`state.deploy.target`); `deploy.freeze_variable` set by the run (not set before the deploy) while migration files lie between the rollback target and the release sha; a fix that is not gate-only; a ref already re-evaluated.
877
+ - **Audit**: every use appends a `controls.jsonl` line (`verb: regate`) with the actor, the fix sha, the release sha and `gate_sha` (sha1 over the changed gate paths and their blobs at `--ref`); the release state keeps `regates[]`, and gate telemetry recorded afterwards carries that `gate_sha`.
878
+
879
+ ### Policy reference (`.forge/release.yaml`, #5572)
880
+
881
+ One row per key path of `POLICY_SCHEMA` (`bin/lean/release-config.mjs`). `<name>` is a map key you choose and `[]` a list item. A default of "none" means the key is unset and its feature is off. `bin/lean/release-docs.test.mjs` fails when a schema key is missing here or a key listed here is not in the schema, so a phase that adds a key documents it in the same change.
882
+
883
+ | Key | Type | Default | Meaning |
884
+ |-----|------|---------|---------|
885
+ | `schema` | 1 | required | Policy file version; must be `1`. |
886
+ | `branches` | object | - | Branch names the release lanes use. |
887
+ | `branches.default` | string | `main` (init profile) | The branch releases land on; the policy file is read only from here (I13). |
888
+ | `branches.integration` | string | null | Integration branch for lanes with `base: integration`; unset makes such a lane unreachable. |
889
+ | `branches.train` | string | none | Branch prefix or name for train waves. |
890
+ | `branches.release` | string | none | Branch prefix or name for release waves. |
891
+ | `branches.hotfix` | string | none | Branch prefix or name for hotfix (P0) branches. |
892
+ | `trust` | object | - | Who the pipeline believes. |
893
+ | `trust.actors` | array | none | Logins whose control comments and commits are trusted. |
894
+ | `trust.require_verified_commits` | boolean | off | Refuse release commits that are not verified. |
895
+ | `state` | object | - | Where release state lives and how leases behave. |
896
+ | `state.ledger_prefix` | string | built-in prefix | Name prefix of the ledger entries kept on GitHub. |
897
+ | `state.lease_ttl_s` | number | built-in | Seconds a run lease stays valid without a heartbeat. |
898
+ | `state.heartbeat_s` | number | built-in | Seconds between lease heartbeats. |
899
+ | `units` | map | none | Deployable units, keyed by name; each is mapped to code paths. |
900
+ | `units.<name>.paths` | array | none | Globs of files that belong to the unit. |
901
+ | `units.<name>.image` | string | null | Image name the unit ships as, when it has one. |
902
+ | `units.<name>.criticality` | low\|medium\|high | none | `low`, `medium` or `high`; feeds risk. |
903
+ | `units.<name>.tests` | array | none | Test commands or names that cover the unit. |
904
+ | `units.<name>.verify` | array | none | Post-deploy checks that cover the unit. |
905
+ | `units.<name>.service_pipeline` | boolean | off | The unit deploys through its own service pipeline. |
906
+ | `units.<name>.single_host_ok` | boolean | off | The unit may run on one host. |
907
+ | `units.<name>.dockerfile` | string | null | Dockerfile checked by `release check-config --coverage`. |
908
+ | `units.<name>.surface` | service\|web\|edge | none | `service`, `web` or `edge`. |
909
+ | `couplings` | array | none | Paths that force other units to roll when they change. |
910
+ | `couplings[].paths` | array | none | Globs whose change couples units. |
911
+ | `couplings[].affects` | array | none | Unit names rolled by that change; each must exist in `units`. |
912
+ | `contracts` | array | none | Producer/consumer interfaces between units. |
913
+ | `contracts[].producer` | string | none | Unit that owns the contract. |
914
+ | `contracts[].consumers` | array | none | Units that depend on it. |
915
+ | `contracts[].paths` | array | none | Globs of the contract files. |
916
+ | `contracts[].additive_only` | boolean | off | Only additive changes are allowed. |
917
+ | `contracts[].regenerate` | string | null | Command that regenerates generated contract files. |
918
+ | `forces` | array | none | Rules that force a pipeline for matching paths. |
919
+ | `forces[].paths` | array | none | Globs the rule matches. |
920
+ | `forces[].pipeline` | full\|service\|hotfix | none | `full`, `service` or `hotfix`. |
921
+ | `forces[].reason` | string | none | Text shown in `release explain`. |
922
+ | `classify` | object | - | Issue classification (the `FORGE:CLASSIFY` record). |
923
+ | `classify.min_confidence` | number | none | Records below this confidence are not trusted for lane choice. |
924
+ | `classify.text_only_cap` | number | 0.5 | Confidence cap for a record built from issue text alone. |
925
+ | `classify.triage_max_per_hour` | number | 10 | Triage classify calls per rolling hour. |
926
+ | `classify.exists_in_evidence` | mechanical\|llm | none | `mechanical` or `llm`: how cited evidence paths are checked. |
927
+ | `risk` | object | - | Risk rules. |
928
+ | `risk.rules` | array | none | Ordered rules; the matching rule sets risk and may force a pipeline. |
929
+ | `risk.rules[].when` | object | none | Conditions, all of which must hold. |
930
+ | `risk.rules[].when.migration` | boolean | none | The change touches migrations. |
931
+ | `risk.rules[].when.paths` | array | none | Globs the change touches. |
932
+ | `risk.rules[].when.contract` | boolean | none | The change touches a contract. |
933
+ | `risk.rules[].when.rolled_units_gt` | number | none | More than this many units roll. |
934
+ | `risk.rules[].when.diff_lines_gt` | number | none | More than this many changed lines. |
935
+ | `risk.rules[].when.requires` | string | none | Named requirement that must hold. |
936
+ | `risk.rules[].risk` | low\|medium\|high | none | `low`, `medium` or `high`. |
937
+ | `risk.rules[].forces` | string | none | Pipeline the rule forces. |
938
+ | `features` | object | - | Feature wave policy (#5571). |
939
+ | `features.flag_policy` | require\|warn\|off | none | `require` refuses a feature wave that adds no rollout key, `warn` warns, `off` does nothing; `lanes.<name>.flag_policy` wins. |
940
+ | `plan` | object | - | The release plan. |
941
+ | `plan.approval` | wait\|auto\|auto-if | `wait` (init profile) | `wait`, `auto` or `auto-if`; `auto-if` is rejected until its phase. |
942
+ | `plan.skip_labels` | array | built-in labels | Issue labels kept out of a plan. |
943
+ | `plan.require_design_gate` | boolean | off | Plan needs the design gate to pass. |
944
+ | `plan.max_issues` | number | none | Issue cap for one plan. |
945
+ | `plan.stale_snapshot_s` | number | none | Seconds after which a plan snapshot is stale. |
946
+ | `lanes` | map | none | Named lanes (for example `release`, `train`, `p0`). |
947
+ | `lanes.<name>.pipeline` | string | `existing` (init profile) | Deploy pipeline the lane runs; `existing` keeps the repo's own. |
948
+ | `lanes.<name>.ci_tier` | string | none | CI tier; must exist in `ci.tiers` when tiers are set. |
949
+ | `lanes.<name>.approval` | string | none | Approval mode for the lane. |
950
+ | `lanes.<name>.budget` | string | none | Budget class for the lane. |
951
+ | `lanes.<name>.base` | live\|integration\|default | none | `live`, `integration` or `default`. |
952
+ | `lanes.<name>.units_max` | number | none | Maximum units per wave. |
953
+ | `lanes.<name>.max_risk` | low\|medium\|high | none | Highest risk the lane accepts. |
954
+ | `lanes.<name>.train_max_issues` | number | none | Issue cap per train wave. |
955
+ | `lanes.<name>.train_max_units` | number | none | Unit cap per train wave. |
956
+ | `lanes.<name>.soak_min` | any | none | Soak time, in minutes, before the next wave. |
957
+ | `lanes.<name>.flag_policy` | require\|warn\|off | none | `require`, `warn` or `off`; overrides `features.flag_policy`. |
958
+ | `lanes.<name>.requires` | array | none | Lanes or checks that must pass first. |
959
+ | `credentials` | object | - | Credentials the gates use. |
960
+ | `credentials.gate_app` | string | null | App identity that posts gate results. |
961
+ | `credentials.lane_env_strip` | array | none | Environment variables removed from lane processes. |
962
+ | `merge` | object | - | How the release PR merges. |
963
+ | `merge.approval` | confirm\|with-plan\|auto | `confirm` (init profile) | `confirm`, `with-plan` or `auto`. |
964
+ | `merge.method` | merge-commit\|squash\|rebase | none | `merge-commit`, `squash` or `rebase`. |
965
+ | `merge.trailers` | array | none | Commit trailers added to the merge. |
966
+ | `ci` | object | - | CI policy for releases. |
967
+ | `ci.provider` | github-actions\|command | `github-actions` | `github-actions`; `command` is rejected until its phase. |
968
+ | `ci.required_checks` | any | none | Checks required on the release PR. |
969
+ | `ci.selection` | any | none | How CI jobs are chosen for a diff. |
970
+ | `ci.rerun_budget_min` | number | none | Minutes of reruns the flake classifier may spend. |
971
+ | `ci.fix` | object | - | Gate-failure fix loop. |
972
+ | `ci.fix.max_rounds` | integer | none | Fix rounds before the release stops. |
973
+ | `ci.fix.co_start` | boolean | none | Start the fix lane while checks still run. |
974
+ | `ci.fix.full_run_workflow` | string | none | Workflow that runs the full suite on a fix. |
975
+ | `ci.flake` | object | - | Flake handling (#5568). |
976
+ | `ci.flake.quarantine_after` | number | none | Flakes of one test before it is quarantined. |
977
+ | `ci.flake.window_days` | number | none | Days over which flakes are counted. |
978
+ | `ci.unskippable` | array | none | Job-name substrings that can never be skipped or waived. |
979
+ | `ci.tiers` | map | none | Named CI tiers, each a job list. |
980
+ | `ci.tiers.<name>.jobs` | array | none | Job names in the tier. |
981
+ | `ci.nightly` | any | none | Nightly block (#5569): `workflow`, `branch`, `block_release`, `t0_t2_hours`, `t3_t4_hours`, `t3_jobs`, `t4_jobs`, `unskippable`; see Managed release: nightly and budget. |
982
+ | `ci.budget` | any | none | Budget block (#5569): `on_exceed` (`local-first`, `hold`, `proceed`), `ignore`, `model_release_minutes`; see Managed release: nightly and budget. |
983
+ | `preflight` | object | - | Checks run before release. |
984
+ | `preflight.commands` | array | none | Commands run on the host. |
985
+ | `preflight.timeout_s` | number | none | Seconds before a command is killed. |
986
+ | `preflight.blocking` | boolean | none | A failure stops the release. |
987
+ | `deploy` | object | - | Deploy stage. |
988
+ | `deploy.live_release_command` | string | none | Command that reads the live release. |
989
+ | `deploy.freeze_variable` | string | none | Repository variable that freezes deploys. |
990
+ | `deploy.concurrency_group` | string | none | Concurrency group of the deploy workflows. |
991
+ | `deploy.start_timeout_s` | number | 60 | Seconds to wait for a deploy run to start. |
992
+ | `deploy.stage_timeout_s` | number | built-in | Seconds a deploy stage may run. |
993
+ | `deploy.expected_digests_command` | string | none | Command printing the image digests a deploy should end with. |
994
+ | `deploy.recovery` | object | - | Deploy recovery. |
995
+ | `deploy.recovery.rerun_max` | integer | built-in | Reruns of a failed stage. |
996
+ | `deploy.recovery.max_attempts` | integer | built-in | Total attempts. |
997
+ | `deploy.recovery.signatures` | array | none | Failure signatures that may be rerun. |
998
+ | `deploy.pipelines` | map | none | Named deploy pipelines. |
999
+ | `deploy.pipelines.<name>.workflow` | string | none | Workflow file. |
1000
+ | `deploy.pipelines.<name>.trigger` | push\|dispatch | none | `push` or `dispatch`. |
1001
+ | `deploy.pipelines.<name>.inputs` | map | none | String inputs passed on dispatch. |
1002
+ | `deploy.pipelines.<name>.wait` | boolean | none | Wait for the run to finish. |
1003
+ | `verify` | object | - | Deploy verification (#5562). |
1004
+ | `verify.workflow` | string | none | Verification workflow. |
1005
+ | `verify.results` | array | none | Result workflows to read. |
1006
+ | `verify.results[].workflow` | string | none | Workflow file. |
1007
+ | `verify.results[].kind` | smoke\|edge\|convergence | none | `smoke`, `edge` or `convergence`. |
1008
+ | `verify.flags` | array | none | Flags the verification can turn off. |
1009
+ | `verify.flags[].flag` | string | none | Flag name. |
1010
+ | `verify.flags[].off_command` | string | none | Command that turns it off. |
1011
+ | `verify.slis` | array | none | SLI checks; free-form entries. |
1012
+ | `verify.post_deploy_checks_file` | string | none | File of post-deploy checks. |
1013
+ | `verify.close_requires` | verified\|deployed | none | `verified` or `deployed`: what closes an issue. |
1014
+ | `rollback` | object | - | Rollback ladder (#5563). |
1015
+ | `rollback.triggers` | array | none | `smoke`, `health`, `livecheck`, `sli`, `crashloop` or `human`. |
1016
+ | `rollback.ladder` | array | none | Steps in order: `flag`, `unit`, `full`, `stop`. |
1017
+ | `rollback.refuse_across` | array | none | Changes a rollback must not cross (`destructive_migration`). |
1018
+ | `rollback.open_revert_pr` | boolean | none | Open a revert PR after a rollback. |
1019
+ | `rollback.flags` | array | none | Kill switches. |
1020
+ | `rollback.flags[].flag` | string | none | Flag name. |
1021
+ | `rollback.flags[].kill_command` | string | none | Command that kills it. |
1022
+ | `rollback.unit_workflow` | string | none | Workflow that rolls one unit back. |
1023
+ | `rollback.unit_action` | string | none | Action name passed to it. |
1024
+ | `rollback.full_workflow` | string | none | Workflow that rolls everything back. |
1025
+ | `rollback.health_command` | string | none | Command that reports health. |
1026
+ | `rollback.result_command` | string | none | Command that reports the rollback result. |
1027
+ | `events` | object | - | Event sinks. |
1028
+ | `events.webhook_url` | string | none | Webhook that receives release events. |
1029
+ | `quarantine` | object | - | Quarantine limits. |
1030
+ | `quarantine.days` | number | none | Days a quarantine lasts. |
1031
+ | `quarantine.max` | number | none | Maximum quarantined tests. |
1032
+ | `gates` | object | - | Deploy gate catalogue settings (#5583). |
1033
+ | `gates.demote_fb_rate` | number | 5 | False-block percent above which a gate is demoted. |
1034
+ | `gates.demote_window` | integer | 20 | Runs in the demotion window. |
1035
+ | `gates.safety` | array | built-in list | Gates never demoted. |
1036
+ | `gates.paths` | array | built-in globs | Paths a gate-only fix may touch (regate). |
1037
+ | `gates.workflow_steps` | array | none | Workflow steps that count as gate code. |
1038
+ | `controls` | object | - | Operator controls (#5555, #5556, #5564). |
1039
+ | `controls.intake` | any | none | Intake pause settings. |
1040
+ | `controls.conductor` | any | none | Conductor workflow settings. |
1041
+ | `controls.exempt` | any | none | Exemption settings. |
1042
+
1043
+ #### Zero-config profile
1044
+
1045
+ `forgedock release init` writes exactly this to `.forge/release.yaml` and never overwrites an existing file; `release init --conductor` also installs the conductor workflow.
1046
+
1047
+ ```yaml
1048
+ schema: 1
1049
+ branches: {default: main}
1050
+ plan: {approval: wait}
1051
+ lanes: {release: {pipeline: existing}}
1052
+ merge: {approval: confirm}
1053
+ ```
1054
+
1055
+ #### Deferred keys
1056
+
1057
+ These keys are rejected by `release check-config` until their phase ships:
1058
+
1059
+ - `plan.auto_if`
1060
+ - `retention_days`
1061
+ - `ci.forbid_per_issue_steps`
1062
+ - `couplings[].refine`
1063
+ - `ci.provider=command`
1064
+ - `risk.weights`
1065
+
1066
+ #### CLI reference
1067
+
1068
+ | Command | Purpose |
1069
+ |---------|---------|
1070
+ | `forgedock release` | Run the staging to default release as one resumable job (`--merge`, `--watch`, `--resume <id>`). |
1071
+ | `forgedock release p0` | Hotfix lane for an issue or branch (`--units`, `--preempt`, `--yes`). |
1072
+ | `forgedock release verify` | Verify a release sha, or re-run deploy verification of a release id. |
1073
+ | `forgedock release recover` | Recover a release that stopped mid-deploy. |
1074
+ | `forgedock release rollback` | Roll a release back (`--reason`, `--to flag\|unit\|full`, `--later`). |
1075
+ | `forgedock release plan` | Build the release plan for a lane. |
1076
+ | `forgedock release start` | Start a planned release (`--plan`, `--approve`, `--wave`). |
1077
+ | `forgedock release go` | Advance a started release (`--plan`, `--merge`, `--activate <key>`). |
1078
+ | `forgedock release status` | Read-only state of a release (`--watch`, `--json`). |
1079
+ | `forgedock release explain` | Rule trace for an id, issue or PR. |
1080
+ | `forgedock release check-config` | Validate the policy file (`--ref`, `--coverage`). |
1081
+ | `forgedock release init` | Write the zero-config profile. |
1082
+ | `forgedock release control` | Audited controls: `hold`, `resume`, `cancel`, `lane`, `exempt`, `freeze`, `unfreeze`; each also runs as `forgedock release <verb>` and needs `--reason`. `demote`, `promote`, `rollback` and `regate` are control verbs too. |
1083
+ | `forgedock release gates` | Gate telemetry (`check`, `demote`, `record`). |
1084
+ | `forgedock release report` | Model vs measured Actions minutes. |
1085
+ | `forgedock intake` | `pause`, `resume` or `status` of issue intake (`_active.intake`). |
1086
+ | `forgedock ci budget` | Actions-minute budget and CI placement (#5278). |
1087
+ | `controls log` | The `controls.jsonl` audit line every control verb appends; read it through `release status` and `release explain`. |
1088
+ | `ci flakes`, `ci nightly` | Records, not commands: the flake ledger (`_active.flakes`) and the nightly result, read through `release status`, `release explain` and `release report`. |
1089
+
869
1090
  ## `issue_watch` (OPTIONAL)
870
1091
 
871
1092
  Named, scoped, capped watches for `forgedock issue-watch` (see [ISSUE-WATCH.md](ISSUE-WATCH.md)). Write `issue_watch:`, then `watches:`, then one block per watch name. The release keys need `mode: release` and at least a `threshold` or `immediate`.
@@ -1033,6 +1254,7 @@ lean:
1033
1254
  builder_routing: on # on (default) | off: route the build to a mid-tier model by the frozen contract
1034
1255
  builder_mid_model: claude-sonnet-5-5 # optional mid-tier builder model (default claude-sonnet-5-5)
1035
1256
  contract_max_corrections: 3 # #5623: builder correction rounds for a builder-correctable invalid contract before it ends contract.invalid (which a batch then requeues once with a fresh plan)
1257
+ review_max_resumes: 3 # #5644: builder resume rounds, each with only the open findings, for builder-fixable review/conformance failures (regression, unimplemented, omission, deferral, scope) before needs-human; stops early when a round changes nothing
1036
1258
  light:
1037
1259
  mode: shadow # off | shadow (default) | on: light-lane eligibility (#4448; lane wiring #4450)
1038
1260
  max_lines: 40 # upgrade to the full lane above this many non-test diff lines
@@ -1649,6 +1871,8 @@ topology:
1649
1871
  | `coupled_files` | map (glob → glob list) | No | Default unset (#5079). "If file A changes, file B must change": a block map `{when glob: required glob[, glob]}`, e.g. `"infra/guard/bootstrap.sh": "infra/guard/MANIFEST.sha256"`. A key prefixed `added:` fires only for files the lane adds (`"added:scripts/tests/test_*.py": ".github/workflows/ci.yml"`). A lane that changes a `when` file without a matching required file fails precheck with `coupled_file_missing` (`conformance.unimplemented`, builder resumed once). Quote keys that contain `*`, and list alternatives as separate keys: brace globs (`*.{ts,tsx}`) are not expanded. |
1650
1872
  | `verify.baselines` | map (glob → command) | No | Default unset (#5448). Baseline suites validate runs whenever a changed path matches the glob, e.g. `baselines:` with `"shared/content/**": make stealth-baseline`; each distinct command runs once, a non-zero exit fails the gate (`conformance.regression`). The contract's `regression` set (existing tests of callers, shared modules, sibling configs) is folded into `validate` at freeze. A post-deploy requirement needs a registered check id and `local_infeasible_why`; a check-less one is rejected at freeze unless it needs an owner or read-only prod data, and development work is never deferrable as prod-only. |
1651
1873
  | `validate.recipes` | map (regex → replacement) | No | Default unset. A top-level `validate:` block with a block-style `recipes:` map, e.g. `"poetry run pytest": "uv run --with-requirements r.txt pytest"`. Each key is a regex source; the first recipe that matches a frozen validate or `repro_test` command rewrites it at contract freeze (`applyValidateRecipes`), recorded as a decision. Use it for commands whose environment is not installed in lane sandboxes. |
1874
+ | `validate.catalog` | comma list | No | Default `.github/workflows/ci.yml, scripts/ci-local.sh`. CI files from which the engine derives rewrite entries (the repo's own pytest or JS runner) for validate commands freeze preflight finds unrunnable; `validate.recipes` entries take precedence (#5653). |
1875
+ | `validate.regenerate` | string | No | Default unset. Command that regenerates generated artifacts. When a validate failure reads as a stale artifact, it runs once and the validate is rerun; it counts only if regeneration changes no tracked file (#5653). |
1652
1876
  | `topology.route_reachability` | string (command) | No | Default unset (no check, no behaviour change). A repo-supplied command that takes the route paths a diff adds (Next.js `app/**/route.*`, `pages/api/**`; URL form, route groups removed) as arguments and exits non-zero when the production ingress does not deliver them to the service that implements them. Runs in the lean lane after validate and in `review-pr-staging`; a non-zero exit blocks (`conformance.unimplemented`, kind `route_unreachable`). Read by `readEnvConfig` (`bin/engine-cli.mjs`), run by `bin/lean/routecheck.mjs`. |
1653
1877
  | `pages.enabled` / `pages.routes` | bool / list | No | Page gate (#5428). Default on only when the repo tracks Next `app/**/page.*` files; `enabled: false` turns it off, and `routes` globs add non-Next page files. A diff touching a public page needs `page_gate` {design_spec, seo, geo} in the contract (checked by `validateContract`), and `page_missing`-class precheck rows (`page_design_missing`, `page_visual_missing`, `page_metadata_missing`, `page_canonical_missing`, `page_structured_data_missing`, `page_sitemap_missing`, `page_forbidden_pattern`, `page_link_broken`, `page_lint_failed`) fail as `conformance.unimplemented`. Read by `readEnvConfig`, checked by `bin/lean/pagegate.mjs`. |
1654
1878
  | `pages.exclude` / `pages.design_only` | lists | No | Globs (#5585). `exclude` drops internal, auth-gated or admin routes from the page gate entirely (no `page_gate` brief, no `page_*` rows). `design_only` keeps the `design` requirement (`page_gate.design_spec`, an approved spec, 390/1440 screenshots) but skips SEO/GEO. A page whose own file or an ancestor `layout.*` declares `robots: { index: false }` or `noindex` is excluded automatically (needs the file to exist in the worktree). Default empty. |
@@ -62,6 +62,7 @@ The lane follows the repo rule: a milestone issue goes to `milestone/<slug>` (fo
62
62
  - `mode: batch`: claims are `--add`ed to one long-lived `orchestrate` batch, so its K (`parallel:`), the `Depends on` DAG (claims are ordered dependencies first), the supervisor and the report apply. When the batch writes its report the watch starts a new one with the next claims. If another running (not reported, not cancelled) batch of the same repo and lane exists, claims are `--add`ed to it instead of starting a new one. A slow `orchestrate` start (no batch dir within 60 s) never stops the watch: the claims are kept in a `pendingStart` record, later passes adopt the batch when it appears, and after 10 minutes without one the claims are released. An error in any pass is logged, saved as `passError` in `status.json`, shown by `issue-watch status`, and the next pass runs (with `--once` the process still exits non-zero).
63
63
 
64
64
  - `mode: release`: see [Release mode](#release-mode).
65
+ - `mode: triage` (#5558): filing an issue never starts work. Each pass lists new open issues and makes one small model call per issue (text only), then writes a `FORGE:CLASSIFY` comment (`source: text-only`, confidence at most `classify.text_only_cap` (0.5), `migrations` never `none`), applies `type:*`, `priority:*` and `lane:*` suggestion labels and `needs-info` when the body has no `Acceptance` heading or checklist item (no model call). It never claims or builds, makes no call and no write while intake is paused, and skips issues that already carry a `FORGE:CLASSIFY` comment. Keys: `triage.max_per_hour` (model calls per rolling hour, the rest wait for the next pass; falls back to `classify.triage_max_per_hour`, then 10) and `trust_app` (the ForgeDock App is a trusted author; other authors follow the usual trust rules). `release_pause` defaults to on.
65
66
 
66
67
  ## Follow-ups
67
68
 
@@ -20,6 +20,16 @@ Opt-in per repo through forge.yaml `design.routes` (see [`docs/CONFIG.md`](../CO
20
20
 
21
21
  With `design.gate: blocking` every finding is a BLOCKER (`Visual: <route> <kind>`) and the review posts `FORGE:GATE_FAILURE`. With `advisory` the same findings are reported and the gate never fails.
22
22
 
23
+ ## Modified pages (#5648)
24
+
25
+ The spec requirement follows what the diff does to a page, not its path (`pageChange` in `bin/lean/pagegate.mjs`):
26
+
27
+ - **new** (added, or no added list or diff to judge by: fails closed) and **rewrite** (any markup, `className`/`style` or import/export line changed, or churn at or over `pages.rewrite_threshold`, default `0.6`, of the file) need an approved FORGE:DESIGN_SPEC.
28
+ - **copy** (only text or data lines changed in an existing page) takes the visual-check path: no spec, no new-page SEO/GEO briefs, still the 390px and 1440px screenshots.
29
+ - **generated** pages (a `generated/` or `__generated__/` path, a `pages.generated` glob, or an `@generated` header in the first lines) are exempt.
30
+
31
+ At contract time a page deliverable already on the base is not asked for `page_gate`; the lane precheck judges it from the diff.
32
+
23
33
  ## Regression fixture
24
34
 
25
35
  `bin/lean/design-gate.test.mjs` and `bin/lean/visual-gate.test.mjs` hold the fixture from the 2026-11-09 Hands pages: a plain-text hero (`h1` and prose), empty Needs/Evidence/Action boxes and a bare "Get access" link. A bundle adding it fails the gate; a page with a component hero, filled cards and a real button passes.
@@ -60,6 +60,7 @@ Use `--arms control` or `--issues id,id` to rerun part of the set, and `--keep`
60
60
  | Integration points missed | For each `integration` row, the number of `must_touch` paths absent from the diff against the base. |
61
61
  | Oracle pass rate | Over the rows with an oracle (`valid`): the upstream fix tests pass after being overlaid on the arm's head. |
62
62
  | Cost and wall time | Sum of `cost_usd` and `wall_ms`, as in `lightlane-bench.md`. |
63
+ | Sandbox start | Sum of `start_ms`, the lane result's `phases.sandbox_start.ms` (#5620), to compare runs with and without `execution.warm_sandboxes`. Rows with no phases (the control arm, a missing result file) count in `start_unobserved`. |
63
64
 
64
65
  Grading is deterministic: the diff paths and added lines, never an LLM. The scorecard records the run date, the model and the corpus revision (`version@base+<hash of the corpus file>`).
65
66
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forgedock",
3
- "version": "1.59.1",
3
+ "version": "1.60.0",
4
4
  "description": "An AI engineering team that ships to production",
5
5
  "bin": {
6
6
  "forgedock": "bin/forgedock.mjs"
@@ -55,7 +55,8 @@
55
55
  "test:sh": "bash scripts/run-shell-tests.sh",
56
56
  "docs:dev": "vitepress dev docs/site",
57
57
  "docs:build": "vitepress build docs/site",
58
- "docs:preview": "vitepress preview docs/site"
58
+ "docs:preview": "vitepress preview docs/site",
59
+ "lint:js": "eslint bin scripts packages"
59
60
  },
60
61
  "engines": {
61
62
  "node": ">=18"
@@ -64,6 +65,8 @@
64
65
  "@anthropic-ai/sdk": ">=0.30.0 <1"
65
66
  },
66
67
  "devDependencies": {
68
+ "eslint": "^9.39.1",
69
+ "globals": "^16.5.0",
67
70
  "vitepress": "^1.6.3"
68
71
  },
69
72
  "peerDependencies": {
package/pool/README.md CHANGED
@@ -15,3 +15,5 @@ Claude login choice (#5165): among the router host's logins with 30+ minutes lef
15
15
  Disk reporting (#5535, all fields optional; absent from an old agent means unknown): the agent's `GET /capacity` carries `disk_free_gb` (free space under its state dir) and `sandbox_disk_mb` (`{sandbox id: MB}`, refreshed at most every 60s). The router's `GET /agents` passes `disk_free_gb` through in `agents[]` and adds `disk_used_mb` to each `sandboxes[id]`. `forgedock gc` prints the disk used per pool entry (`unknown` when absent) and `forgedock doctor` shows each agent's free disk, warning below `hygiene.min_free_gb`.
16
16
 
17
17
  The `forgedock pool` CLI wiring is tracked separately (#4544).
18
+
19
+ Per-repo lane tools (#5650): forge.yaml `execution.lane_tools` (`name` or `name@version`) rides in the launch spec as `lane_tools`. The agent resolves the image in `launch` (`bin/pool/lane-tools.mjs`): no tools keeps the base `forgedock-lane:<version>`; otherwise it uses `<base>-t<sha256 of the sorted list, 12 hex>`, building it once `FROM` the base with one recipe per tool (warm sandboxes keep `lane_tools` in their stored spec, so they use the same image). A tool with no recipe fails before any build (`lane_tools.unknown_recipe`, naming the tool and the known recipes); a failed or timed-out build is `lane_tools.build_failed` and the launch records the error. To add a recipe, add an entry to `RECIPES` in `bin/pool/lane-tools.mjs`: `{versioned, steps(version) -> Dockerfile instructions}` for the Debian/Ubuntu lane image; tool names appear nowhere else.
@@ -131,6 +131,8 @@ export function aggregateAdversarial(rows, meta) {
131
131
  oracle_pass_rate: oracle.length ? r4(oracle.filter((r) => r.oracle_pass === true).length / oracle.length) : null,
132
132
  cost_usd: r4(sumOf(mine, "cost_usd")),
133
133
  wall_ms: sumOf(mine, "wall_ms"),
134
+ start_ms: sumOf(mine, "start_ms"), // #5620: sandbox start wait, to compare execution.warm_sandboxes on/off
135
+ start_unobserved: mine.filter((r) => !Number.isFinite(r.start_ms)).length,
134
136
  light_unobserved: mine.filter((r) => r.light_unobserved === true).length, // #5541
135
137
  };
136
138
  }
@@ -147,6 +149,8 @@ export function renderScorecard({ meta, arms }) {
147
149
  ["Oracle pass rate", (a) => (a.oracle_pass_rate == null ? "n/a" : `${a.oracle_pass_rate} (n=${a.oracle_n})`)],
148
150
  ["Cost (USD, sum)", (a) => String(a.cost_usd)],
149
151
  ["Wall time (ms, sum)", (a) => String(a.wall_ms)],
152
+ ["Sandbox start (ms, sum)", (a) => String(a.start_ms)],
153
+ ["Lanes with no start timing (start_unobserved)", (a) => String(a.start_unobserved)],
150
154
  ["Lanes with no `light` in the result (light_unobserved)", (a) => String(a.light_unobserved)],
151
155
  ];
152
156
  return [
@@ -138,7 +138,7 @@ async function grade({ run, src, head, base, corpus, issue, tmp, tag, apiShape }
138
138
  /** Run one arm on one corpus issue and grade it -> one row (see aggregate). `now` and `apiShape` are injectable. */
139
139
  export async function runArm({ arm, issue, corpus, cfg, run = benchDefaultRun, tmp, now = () => Date.now(), apiShape = detectApiShape }) {
140
140
  const tag = `${arm}-${issue.id}`, a = cfg.arms[arm];
141
- const row = { arm, id: issue.id, cost_usd: null, wall_ms: null, model_ms: null, harness_wall_ms: null, claimed_fix: false, oracle_pass: false, suite_pass: null,
141
+ const row = { arm, id: issue.id, cost_usd: null, wall_ms: null, model_ms: null, start_ms: null, harness_wall_ms: null, claimed_fix: false, oracle_pass: false, suite_pass: null,
142
142
  api_shape: null, light: null, light_unobserved: false, light_eligibility: null, light_upgrade: null, terminal: null };
143
143
  const t0 = now();
144
144
  let src = null, head = null, base = corpus.base, claimed = false;
@@ -165,6 +165,7 @@ export async function runArm({ arm, issue, corpus, cfg, run = benchDefaultRun, t
165
165
  const res = readJson(rf);
166
166
  row.terminal = res?.terminalReason ?? `exit ${r.code}`;
167
167
  row.cost_usd = num(res?.cost_usd); row.wall_ms = num(res?.wall_ms); row.model_ms = num(res?.model_ms);
168
+ row.start_ms = num(res?.phases?.sandbox_start?.ms); // #5620: lane sandbox start wait (SANDBOX_STEP steps live under it); null when the result has no phases
168
169
  row.light = typeof res?.light === "boolean" ? res.light : null;
169
170
  row.light_unobserved = row.light === null; // #5541: no result file (or no `light` field), so the lane's depth is unknown, not false
170
171
  row.light_eligibility = res?.light_eligibility ?? null;
@@ -0,0 +1,7 @@
1
+ {
2
+ "schema": "forgedock.release.conductor-scopes/v1",
3
+ "token": "GITHUB_TOKEN of the conductor workflow",
4
+ "permissions": { "actions": "write", "contents": "write", "issues": "write" },
5
+ "allows": ["read workflow runs (actions)", "workflow dispatch and rerun (actions: write)", "write the forge-ledger/* branches (contents: write, limited by ledger rulesets)", "lease comment and needs-agent issue (issues: write)"],
6
+ "forbids": ["production secrets", "pull-requests: write", "merge", "id-token: write"]
7
+ }
@@ -0,0 +1,57 @@
1
+ # ForgeDock release conductor (#5564): host-less recovery for a managed release whose driver went away.
2
+ # Installed by `forgedock release init --conductor` (placeholders are filled with the exact forgedock version).
3
+ # It never plans, builds, reviews, merges or patches: it calls `forgedock release recover <id>`, which takes a stale lease
4
+ # and runs only the GitHub-only recovery actions. The token scopes are listed in forge-conductor.scopes.json.
5
+ name: ForgeDock Conductor
6
+
7
+ on:
8
+ workflow_run:
9
+ workflows: __DEPLOY_WORKFLOWS__
10
+ types: [completed]
11
+ deployment_status:
12
+ workflow_dispatch:
13
+ schedule:
14
+ - cron: '__WATCHDOG_CRON__'
15
+
16
+ permissions:
17
+ actions: write
18
+ contents: write
19
+ issues: write
20
+
21
+ concurrency:
22
+ group: forge-conductor
23
+ cancel-in-progress: false
24
+
25
+ jobs:
26
+ recover:
27
+ runs-on: ubuntu-latest
28
+ timeout-minutes: 60
29
+ steps:
30
+ # No-op path: nothing is checked out or installed unless `_active` names a release.
31
+ - name: Find the active release
32
+ id: active
33
+ env:
34
+ GH_TOKEN: ${{ github.token }}
35
+ run: |
36
+ id=$(gh api "repos/${GITHUB_REPOSITORY}/contents/active.json?ref=_active" --jq '.content' 2>/dev/null | base64 -d 2>/dev/null | jq -r '.lease.release // empty' 2>/dev/null || true)
37
+ echo "release=${id}" >> "$GITHUB_OUTPUT"
38
+ [ -n "$id" ] || echo "no active release; nothing to do"
39
+
40
+ - name: Checkout default branch
41
+ if: steps.active.outputs.release != ''
42
+ uses: actions/checkout@v4
43
+ with:
44
+ fetch-depth: 0
45
+
46
+ - name: Set up Node
47
+ if: steps.active.outputs.release != ''
48
+ uses: actions/setup-node@v4
49
+ with:
50
+ node-version: 20
51
+
52
+ - name: Recover
53
+ if: steps.active.outputs.release != ''
54
+ env:
55
+ GH_TOKEN: ${{ github.token }}
56
+ RELEASE_ID: ${{ steps.active.outputs.release }}
57
+ run: npx --yes forgedock@__FORGEDOCK_VERSION__ release recover "$RELEASE_ID" --repo "$GITHUB_REPOSITORY"