forgedock 1.53.0 → 1.54.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.
- package/.claude-plugin/marketplace.json +51 -0
- package/README.md +8 -2
- package/bin/auth/app-manifest.mjs +89 -0
- package/bin/auth/app-manifest.test.mjs +75 -0
- package/bin/auth/app-token.mjs +256 -0
- package/bin/auth/app-token.test.mjs +232 -0
- package/bin/brand.mjs +7 -0
- package/bin/config-history.mjs +151 -0
- package/bin/config-schema.mjs +115 -0
- package/bin/demo.mjs +65 -11
- package/bin/engine/outcome-codes.mjs +6 -3
- package/bin/engine/telemetry-seam.mjs +8 -2
- package/bin/engine/telemetry-seam.test.mjs +17 -0
- package/bin/engine-cli.mjs +57 -20
- package/bin/first-run.mjs +122 -0
- package/bin/forgedock.mjs +128 -146
- package/bin/help-text.mjs +144 -0
- package/bin/hooks/pre-tool-use.mjs +7 -0
- package/bin/journey.mjs +82 -83
- package/bin/lean/acceptance.mjs +313 -0
- package/bin/lean/acceptance.test.mjs +215 -0
- package/bin/lean/activation.mjs +18 -0
- package/bin/lean/activation.test.mjs +23 -1
- package/bin/lean/batch-health.mjs +74 -1
- package/bin/lean/batch-health.test.mjs +54 -1
- package/bin/lean/batch.test.mjs +11 -9
- package/bin/lean/branchlock.mjs +54 -0
- package/bin/lean/branchlock.test.mjs +49 -0
- package/bin/lean/ceiling.mjs +72 -0
- package/bin/lean/ceiling.test.mjs +54 -0
- package/bin/lean/ci-budget.mjs +366 -0
- package/bin/lean/ci-budget.test.mjs +167 -0
- package/bin/lean/conformance.e2e.test.mjs +7 -0
- package/bin/lean/conformance.mjs +77 -19
- package/bin/lean/conformance.test.mjs +129 -3
- package/bin/lean/context.mjs +35 -6
- package/bin/lean/context.test.mjs +27 -1
- package/bin/lean/depcache.mjs +25 -1
- package/bin/lean/depcache.test.mjs +26 -0
- package/bin/lean/e2e.mjs +18 -2
- package/bin/lean/e2e.test.mjs +26 -1
- package/bin/lean/effects.mjs +40 -11
- package/bin/lean/execution.test.mjs +24 -0
- package/bin/lean/facts.mjs +3 -3
- package/bin/lean/facts.test.mjs +5 -0
- package/bin/lean/fixround.mjs +14 -0
- package/bin/lean/fixround.test.mjs +25 -2
- package/bin/lean/gh-assoc.test.mjs +2 -1
- package/bin/lean/integration.mjs +100 -9
- package/bin/lean/integration.test.mjs +98 -0
- package/bin/lean/issuewatch-parity.mjs +64 -0
- package/bin/lean/issuewatch-parity.test.mjs +127 -0
- package/bin/lean/issuewatch-release.test.mjs +1 -1
- package/bin/lean/issuewatch.mjs +34 -5
- package/bin/lean/issuewatch.test.mjs +3 -2
- package/bin/lean/lean.mjs +316 -74
- package/bin/lean/lean.test.mjs +397 -24
- package/bin/lean/mechfix.mjs +124 -0
- package/bin/lean/mechfix.test.mjs +75 -0
- package/bin/lean/orchestrate.mjs +20 -2
- package/bin/lean/phaseledger.mjs +47 -5
- package/bin/lean/phaseledger.test.mjs +30 -1
- package/bin/lean/precheck.mjs +23 -4
- package/bin/lean/precheck.test.mjs +14 -1
- package/bin/lean/prereq.mjs +28 -0
- package/bin/lean/prereq.test.mjs +20 -0
- package/bin/lean/probe.mjs +4 -2
- package/bin/lean/prodparity.mjs +52 -0
- package/bin/lean/prodparity.test.mjs +67 -0
- package/bin/lean/prompts.mjs +69 -12
- package/bin/lean/recovery.test.mjs +1 -1
- package/bin/lean/release-io.test.mjs +42 -0
- package/bin/lean/release-postmerge.mjs +6 -0
- package/bin/lean/release-preflight.mjs +58 -0
- package/bin/lean/release-preflight.test.mjs +114 -0
- package/bin/lean/release-rehearsal.mjs +8 -7
- package/bin/lean/release-review.mjs +67 -11
- package/bin/lean/release-review.test.mjs +128 -1
- package/bin/lean/release-snapshot.mjs +188 -0
- package/bin/lean/release-snapshot.test.mjs +190 -0
- package/bin/lean/release.mjs +80 -12
- package/bin/lean/release.test.mjs +95 -0
- package/bin/lean/render.mjs +1 -1
- package/bin/lean/replan.mjs +184 -0
- package/bin/lean/replan.test.mjs +110 -0
- package/bin/lean/resume.mjs +9 -7
- package/bin/lean/resume.test.mjs +16 -0
- package/bin/lean/schedd.mjs +34 -1
- package/bin/lean/schedd.test.mjs +21 -1
- package/bin/lean/selfreview.mjs +94 -0
- package/bin/lean/selfreview.test.mjs +58 -1
- package/bin/lean/selftest-gate.mjs +22 -0
- package/bin/lean/selftest-gate.test.mjs +18 -1
- package/bin/lean/selftest-journey.mjs +234 -0
- package/bin/lean/selftest-journey.test.mjs +130 -0
- package/bin/lean/selftest-live.mjs +2 -1
- package/bin/lean/seqlease.mjs +35 -1
- package/bin/lean/seqlease.test.mjs +15 -0
- package/bin/lean/seqreserve.e2e.test.mjs +135 -0
- package/bin/lean/seqreserve.mjs +73 -0
- package/bin/lean/seqreserve.test.mjs +134 -0
- package/bin/lean/sequence.mjs +35 -6
- package/bin/lean/seqversioned.mjs +147 -0
- package/bin/lean/stagestamp.mjs +28 -0
- package/bin/lean/stagestamp.test.mjs +32 -0
- package/bin/lean/surfaces.mjs +75 -0
- package/bin/lean/surfaces.test.mjs +59 -0
- package/bin/lean/toolplace.mjs +28 -0
- package/bin/lean/toolplace.test.mjs +24 -0
- package/bin/lean/toolstats.mjs +3 -1
- package/bin/lean/toolstats.test.mjs +11 -0
- package/bin/lean/validatebest.mjs +28 -0
- package/bin/lean/validatebest.test.mjs +27 -0
- package/bin/pool/agent.mjs +9 -0
- package/bin/pool/docker.mjs +5 -0
- package/bin/pool/router.mjs +8 -4
- package/bin/prereqs.mjs +111 -0
- package/bin/replay-timelapse.mjs +149 -0
- package/bin/review-staging.mjs +100 -16
- package/bin/review-staging.test.mjs +18 -0
- package/bin/runner.mjs +43 -6
- package/bin/splash-install.mjs +157 -0
- package/bin/stats/aggregate.mjs +8 -1
- package/bin/stats/conformance-outcomes.mjs +100 -19
- package/bin/stats/conformance-outcomes.test.mjs +87 -1
- package/bin/stats/depth.mjs +88 -31
- package/bin/stats/depth.test.mjs +63 -38
- package/bin/stats/efficiency.mjs +26 -5
- package/bin/stats/efficiency.test.mjs +45 -1
- package/bin/stats/first-review.mjs +77 -0
- package/bin/stats/first-review.test.mjs +36 -0
- package/bin/stats/firstmerge.mjs +40 -0
- package/bin/stats/firstmerge.test.mjs +41 -0
- package/bin/stats/github-source.mjs +51 -13
- package/bin/stats/index.mjs +91 -15
- package/bin/stats/local-source.mjs +1 -0
- package/bin/stats/origin.mjs +80 -0
- package/bin/stats/origin.test.mjs +58 -0
- package/bin/stats/render.mjs +3 -1
- package/bin/stats/scoreboard.mjs +137 -0
- package/bin/stats/scoreboard.test.mjs +87 -0
- package/bin/stats/stats.test.mjs +80 -0
- package/bin/tui.mjs +3 -2
- package/commands/bootstrap.md +15 -14
- package/commands/deploy-pr.md +18 -3
- package/commands/forge-stats.md +1 -1
- package/commands/forgedock-ci-setup.md +28 -0
- package/commands/forgedock-init.md +4 -5
- package/commands/issue.md +2 -0
- package/commands/milestone.md +9 -1
- package/commands/replay.md +2 -0
- package/commands/review-pr-staging.md +4 -1
- package/commands/work-on/close.md +8 -0
- package/docs/CONFIG.md +105 -10
- package/docs/ISSUE-WATCH.md +23 -0
- package/docs/OUTCOME-CODES.md +1 -0
- package/docs/REPLAY.md +9 -0
- package/docs/SELFTEST.md +11 -0
- package/docs/STATS.md +19 -2
- package/docs/eval/README.md +6 -0
- package/docs/eval/adversarial-bench.md +68 -0
- package/docs/eval/corpus/adversarial-v1.json +285 -0
- package/docs/eval/feature-bench.md +42 -0
- package/docs/eval/feature-specs/crud-auth/journeys/notes-crud-isolated.mjs +21 -0
- package/docs/eval/feature-specs/crud-auth/journeys/register-login.mjs +12 -0
- package/docs/eval/feature-specs/crud-auth/spec.md +15 -0
- package/docs/site/start-a-new-project.md +2 -1
- package/package.json +5 -2
- package/plugins/forgedock-splash/.claude-plugin/plugin.json +10 -0
- package/plugins/forgedock-splash/README.md +27 -0
- package/plugins/forgedock-splash/hooks/hooks.json +1 -0
- package/plugins/forgedock-splash/hooks/register.tsx +74 -0
- package/plugins/forgedock-splash/hooks/scene.ts +222 -0
- package/plugins/forgedock-splash/types/index.d.ts +10 -0
- package/scripts/bench-adversarial.mjs +216 -0
- package/scripts/bench-feature.mjs +170 -0
- package/scripts/bench-lightlane.mjs +2 -2
- package/scripts/bootstrap-create.mjs +2 -2
- package/scripts/bootstrap-validate.mjs +35 -2
- package/scripts/check-spec-size.sh +4 -3
- package/scripts/check-spec-size.test.sh +3 -0
- package/scripts/plan-validate-live.mjs +40 -6
- package/scripts/review-pr-staging-scope.test.sh +1 -1
- package/scripts/review-staging-post.sh +23 -0
- package/scripts/review-staging-post.test.sh +8 -0
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "adversarial-v1",
|
|
3
|
+
"description": "Adversarial corpus (#5292): more-itertools at the lightlane-v1 base. Valid issues (upstream fixes), wrong-premise, duplicate and already-shipped issues that must be closed with evidence, and integration issues that must touch more.py, more.pyi and docs/api.rst. Instructions: docs/eval/adversarial-bench.md.",
|
|
4
|
+
"upstream": "more-itertools/more-itertools",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"clone_url": "https://github.com/more-itertools/more-itertools.git",
|
|
7
|
+
"base": "670b715b307adfe5d2fca08a87ca562cb8bfea2c",
|
|
8
|
+
"suite_command": "python3 -m unittest discover -q -s tests -t .",
|
|
9
|
+
"control_prompt": "Fix this issue in the repository in the current directory. Write a failing regression test first, then the fix, then run the targeted tests. Do not use web tools.\n\nIssue: {title}\n\n{body}",
|
|
10
|
+
"issues": [
|
|
11
|
+
{
|
|
12
|
+
"id": "adv-valid-1293",
|
|
13
|
+
"kind": "valid",
|
|
14
|
+
"expected": "implement",
|
|
15
|
+
"upstream_issue": 1293,
|
|
16
|
+
"fix_pr": 1294,
|
|
17
|
+
"fix_sha": "1dd480a08bc2a4c399c84bf21cb1558f8b5fc838",
|
|
18
|
+
"title": "Repeated zero-cache seekable.peek() retains nested chain iterators",
|
|
19
|
+
"body": "On current master (`b5e3886`), the fix for #1268 preserves values but each `seekable(..., maxlen=0).peek()` prepends a new `chain` around the previous source. Repeated peeking without advancing retains an iterator chain proportional to the number of calls, despite having no history cache.\n\n```python\nimport tracemalloc\nfrom more_itertools import seekable\n\ns = seekable(range(3), maxlen=0)\ntracemalloc.start()\ns.peek()\nbaseline = tracemalloc.get_traced_memory()[0]\nfor _ in range(10000):\n assert s.peek() == 0\nprint(tracemalloc.get_traced_memory()[0] - baseline)\nprint(list(s.elements()), list(s))\n```\n\nOn CPython 3.12.13/macOS this retains 2,427,672 additional bytes; output remains `[] [0, 1, 2]`. A single lookahead slot should be sufficient regardless of the number of repeated `peek()`/`bool()` calls. I am checking a fix that reuses the existing `peekable` helper only in the zero-history case, with unchanged bounded/unbounded history behavior.\n\nInvestigation performed with AI assistance.\n",
|
|
20
|
+
"oracle": {
|
|
21
|
+
"files": [
|
|
22
|
+
"tests/test_more.py"
|
|
23
|
+
],
|
|
24
|
+
"command": "python3 -m unittest -q tests.test_more.SeekableTest.test_repeated_zero_cache_peek_has_bounded_memory",
|
|
25
|
+
"note": "670b715 is the merge parent of the fix, but the fix branch also carries the #1268/#1269 seekable maxlen=0 value fix; on the base the oracle errors with StopIteration, so an arm passes only by bounding memory and keeping the peeked values."
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "adv-valid-1304",
|
|
30
|
+
"kind": "valid",
|
|
31
|
+
"expected": "implement",
|
|
32
|
+
"upstream_issue": 1304,
|
|
33
|
+
"fix_pr": 1305,
|
|
34
|
+
"fix_sha": "1ea82a711c69f590054987b5cb194157f8ce8ac4",
|
|
35
|
+
"title": "ichunked(..., 0) raises islice's ValueError on a nonempty iterable",
|
|
36
|
+
"body": "`ichunked` is documented as being like `chunked`, but with lazy chunks. `chunked` treats `n=0` as \"yield nothing\". `ichunked` only does that when the source is already empty; with any remaining items it calls `islice(iterator, n - 1)` and blows up.\n\nI hit this switching a streaming pipeline from `chunked` to `ichunked` so batches would not be materialized as lists. Chunk size comes from the same config in both paths; `0` means \"this stage is disabled, emit nothing.\"\n\n```python\nfrom more_itertools import chunked, ichunked\n\nrows = [\"a\", \"b\", \"c\"] # e.g. leftover rows from a DB cursor\nchunk_size = 0 # config: skip this sink\n\nprint(list(chunked(rows, chunk_size)))\n# []\n\nprint([list(c) for c in ichunked(rows, chunk_size)])\n# ValueError: Stop argument for islice() must be None or an integer: 0 <= x <= sys.maxsize.\n```\n\n`IchunkedTests.test_zero` only uses `iterable = []`, which never enters the `for first in iterator` loop, so the `islice(..., n - 1)` path is untested.\n\nNegative `n` has the same leak: `chunked` raises `ValueError: n must be at least 0`, `ichunked` raises islice's \"Indices for islice() must be None or an integer...\".\n\nHappy to send a PR.",
|
|
37
|
+
"oracle": {
|
|
38
|
+
"files": [
|
|
39
|
+
"tests/test_more.py"
|
|
40
|
+
],
|
|
41
|
+
"command": "python3 -m unittest -q tests.test_more.IchunkedTests.test_zero_nonempty tests.test_more.IchunkedTests.test_negative"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "adv-valid-1308",
|
|
46
|
+
"kind": "valid",
|
|
47
|
+
"expected": "implement",
|
|
48
|
+
"upstream_issue": 1308,
|
|
49
|
+
"fix_pr": 1309,
|
|
50
|
+
"fix_sha": "67fcf640477c78605580f5ee703a54c73c1e7a8a",
|
|
51
|
+
"title": "bucket ignores a supplied validator when the callable is falsey",
|
|
52
|
+
"body": "`bucket` replaces a supplied validator with its default when the callable has a false truth value. An empty callable set is one example:\n\n```python\nfrom more_itertools import bucket\n\nclass AllowedKeys(set):\n def __call__(self, key):\n return key in self\n\nallowed = AllowedKeys()\nsource = iter([1, 2, 3])\nbuckets = bucket(source, key=lambda x: x, validator=allowed)\nprint(list(buckets[1])) # [1]; expected []\n```\n\nThe validator rejects every key, so selecting a bucket should return an empty iterator without consuming `source`. Instead, `validator or (lambda x: True)` discards it. Membership checks and iteration over bucket keys also accept keys the validator rejects. On an infinite input, a lookup for an absent, rejected key can keep scanning rather than return immediately.\n\nI reproduced this on current main (11.1.0). Changing the default selection to `(lambda x: True) if validator is None else validator` preserves the supplied callable. My regression checks rejected selection, membership, source consumption, and key iteration; the full unittest suite passes with that change.\n\nI can send the small fix and regression test if this behavior is unintended.\n",
|
|
53
|
+
"oracle": {
|
|
54
|
+
"files": [
|
|
55
|
+
"tests/test_more.py"
|
|
56
|
+
],
|
|
57
|
+
"command": "python3 -m unittest -q tests.test_more.BucketTests.test_falsey_validator_is_honoured"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"id": "adv-wp-chunked-tail",
|
|
62
|
+
"kind": "wrong-premise",
|
|
63
|
+
"expected": "close",
|
|
64
|
+
"title": "chunked() silently drops the final partial chunk",
|
|
65
|
+
"body": "`list(chunked(range(5), 2))` should be `[[0, 1], [2, 3], [4]]`, but I believe the trailing `[4]` is lost on current master, so data disappears whenever the length is not a multiple of n. Please make chunked() keep the remainder.",
|
|
66
|
+
"evidence": {
|
|
67
|
+
"file": "more_itertools/more.py",
|
|
68
|
+
"pattern": "not divisible by \\*n\\*"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "adv-wp-one-empty",
|
|
73
|
+
"kind": "wrong-premise",
|
|
74
|
+
"expected": "close",
|
|
75
|
+
"title": "one() returns None for an empty iterable instead of raising",
|
|
76
|
+
"body": "Calling `one([])` gives back `None` on master, which hides bugs in callers that expect exactly one item. It should raise instead; please change one() to raise on an empty iterable.",
|
|
77
|
+
"evidence": {
|
|
78
|
+
"file": "more_itertools/more.py",
|
|
79
|
+
"pattern": "if too_short is not None"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "adv-wp-first-true-default",
|
|
84
|
+
"kind": "wrong-premise",
|
|
85
|
+
"expected": "close",
|
|
86
|
+
"title": "first_true() has no way to supply a default value",
|
|
87
|
+
"body": "When nothing matches, `first_true` always returns `None` and there is no argument for a fallback, so callers need an extra `or`. Please add a `default` parameter.",
|
|
88
|
+
"evidence": {
|
|
89
|
+
"file": "more_itertools/recipes.py",
|
|
90
|
+
"pattern": "def first_true\\(iterable, default=None, pred=None\\)"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "adv-wp-batched-strict",
|
|
95
|
+
"kind": "wrong-premise",
|
|
96
|
+
"expected": "close",
|
|
97
|
+
"title": "batched() cannot enforce equal-sized batches",
|
|
98
|
+
"body": "Unlike chunked(strict=True), `more_itertools.batched` has no strict option, so a short final batch cannot be rejected. Please add a keyword-only `strict` argument.",
|
|
99
|
+
"evidence": {
|
|
100
|
+
"file": "more_itertools/recipes.py",
|
|
101
|
+
"pattern": "def batched\\(iterable, n, \\*, strict=False\\)"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"id": "adv-wp-sliding-window-short",
|
|
106
|
+
"kind": "wrong-premise",
|
|
107
|
+
"expected": "close",
|
|
108
|
+
"title": "sliding_window() raises when the iterable is shorter than the window",
|
|
109
|
+
"body": "`list(sliding_window([1, 2], 3))` blows up on master instead of returning an empty list. Please make short inputs yield nothing.",
|
|
110
|
+
"evidence": {
|
|
111
|
+
"file": "more_itertools/recipes.py",
|
|
112
|
+
"pattern": "then nothing is yielded"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"id": "adv-dup-chunks",
|
|
117
|
+
"kind": "duplicate",
|
|
118
|
+
"expected": "close",
|
|
119
|
+
"title": "Add a chunks() helper that splits an iterable into fixed-size lists",
|
|
120
|
+
"body": "There is no helper to split an iterable into lists of at most n items. Please add `chunks(iterable, n)` that yields lists, with the last one shorter when needed.",
|
|
121
|
+
"evidence": {
|
|
122
|
+
"file": "more_itertools/more.py",
|
|
123
|
+
"pattern": "def chunked\\("
|
|
124
|
+
},
|
|
125
|
+
"forbid_new_defs": [
|
|
126
|
+
"^\\s*def (chunks|chunk|batches|grouper|split_into_chunks)\\("
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"id": "adv-dup-flatten-once",
|
|
131
|
+
"kind": "duplicate",
|
|
132
|
+
"expected": "close",
|
|
133
|
+
"title": "Add flatten_once() to flatten one level of nesting",
|
|
134
|
+
"body": "I need a function that flattens exactly one level of an iterable of iterables. Please add `flatten_once(iterables)`.",
|
|
135
|
+
"evidence": {
|
|
136
|
+
"file": "more_itertools/recipes.py",
|
|
137
|
+
"pattern": "def flatten\\("
|
|
138
|
+
},
|
|
139
|
+
"forbid_new_defs": [
|
|
140
|
+
"^\\s*def (flatten_once|flatten_one|flat|flatten_one_level)\\("
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"id": "adv-dup-nth-default",
|
|
145
|
+
"kind": "duplicate",
|
|
146
|
+
"expected": "close",
|
|
147
|
+
"title": "Add nth_or_default() returning the n-th item or a default",
|
|
148
|
+
"body": "Getting the n-th item of an iterator without raising IndexError needs islice plus next. Please add `nth_or_default(iterable, n, default)`.",
|
|
149
|
+
"evidence": {
|
|
150
|
+
"file": "more_itertools/recipes.py",
|
|
151
|
+
"pattern": "def nth\\(iterable, n, default=None\\)"
|
|
152
|
+
},
|
|
153
|
+
"forbid_new_defs": [
|
|
154
|
+
"^\\s*def (nth_or_default|get_nth|nth_item|item_at)\\("
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"id": "adv-dup-consecutive-pairs",
|
|
159
|
+
"kind": "duplicate",
|
|
160
|
+
"expected": "close",
|
|
161
|
+
"title": "Add pairs() yielding each item with its successor",
|
|
162
|
+
"body": "Please add `pairs(iterable)` so `pairs('ABC')` yields `('A', 'B')` then `('B', 'C')`.",
|
|
163
|
+
"evidence": {
|
|
164
|
+
"file": "more_itertools/recipes.py",
|
|
165
|
+
"pattern": "def pairwise\\(iterable\\)"
|
|
166
|
+
},
|
|
167
|
+
"forbid_new_defs": [
|
|
168
|
+
"^\\s*def (pairs|consecutive_pairs|neighbours|neighbors)\\("
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"id": "adv-af-triplewise",
|
|
173
|
+
"kind": "already-fixed",
|
|
174
|
+
"expected": "close",
|
|
175
|
+
"title": "Add a triplewise() recipe for overlapping triples",
|
|
176
|
+
"body": "There is no recipe that yields overlapping triples such as `('A','B','C'), ('B','C','D')`. Please add `triplewise(iterable)` to the recipes.",
|
|
177
|
+
"evidence": {
|
|
178
|
+
"file": "more_itertools/recipes.py",
|
|
179
|
+
"pattern": "def triplewise\\(iterable\\)"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"id": "adv-af-sum-of-squares",
|
|
184
|
+
"kind": "already-fixed",
|
|
185
|
+
"expected": "close",
|
|
186
|
+
"title": "Add sum_of_squares() to the recipes",
|
|
187
|
+
"body": "Please add a `sum_of_squares(iterable)` recipe that returns the sum of the squares of the values.",
|
|
188
|
+
"evidence": {
|
|
189
|
+
"file": "more_itertools/recipes.py",
|
|
190
|
+
"pattern": "def sum_of_squares\\(iterable\\)"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"id": "adv-af-polynomial-eval",
|
|
195
|
+
"kind": "already-fixed",
|
|
196
|
+
"expected": "close",
|
|
197
|
+
"title": "Add polynomial_eval() for evaluating a polynomial at a point",
|
|
198
|
+
"body": "There is no recipe to evaluate a polynomial given its coefficients. Please add `polynomial_eval(coefficients, x)`.",
|
|
199
|
+
"evidence": {
|
|
200
|
+
"file": "more_itertools/recipes.py",
|
|
201
|
+
"pattern": "def polynomial_eval\\(coefficients, x\\)"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"id": "adv-int-take-until",
|
|
206
|
+
"kind": "integration",
|
|
207
|
+
"expected": "implement",
|
|
208
|
+
"title": "Add take_until(predicate, iterable): like takewhile but includes the first failing item",
|
|
209
|
+
"body": "Please add `take_until(predicate, iterable)` to more_itertools.more. It yields items until predicate is true, and includes that first matching item. It must be available as `more_itertools.take_until`, with the same public surface as the other helpers.",
|
|
210
|
+
"must_touch": [
|
|
211
|
+
"more_itertools/more.py",
|
|
212
|
+
"more_itertools/more.pyi",
|
|
213
|
+
"docs/api.rst"
|
|
214
|
+
],
|
|
215
|
+
"evidence": {
|
|
216
|
+
"file": "docs/api.rst",
|
|
217
|
+
"pattern": "autofunction:: chunked"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"id": "adv-int-count-runs",
|
|
222
|
+
"kind": "integration",
|
|
223
|
+
"expected": "implement",
|
|
224
|
+
"title": "Add count_runs(iterable): the number of maximal runs of equal items",
|
|
225
|
+
"body": "Please add `count_runs(iterable)` to more_itertools.more, returning how many runs of consecutive equal items the iterable has (`count_runs('aabccc') == 3`). It must be part of the public API like the other helpers.",
|
|
226
|
+
"must_touch": [
|
|
227
|
+
"more_itertools/more.py",
|
|
228
|
+
"more_itertools/more.pyi",
|
|
229
|
+
"docs/api.rst"
|
|
230
|
+
],
|
|
231
|
+
"evidence": {
|
|
232
|
+
"file": "docs/api.rst",
|
|
233
|
+
"pattern": "autofunction:: chunked"
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"id": "adv-int-minmax-by",
|
|
238
|
+
"kind": "integration",
|
|
239
|
+
"expected": "implement",
|
|
240
|
+
"title": "Add minmax_by(iterable, key): the min and max items by a key in one pass",
|
|
241
|
+
"body": "Please add `minmax_by(iterable, key)` to more_itertools.more, returning a `(smallest, largest)` tuple by key from a single pass over the input. It must be part of the public API like the other helpers.",
|
|
242
|
+
"must_touch": [
|
|
243
|
+
"more_itertools/more.py",
|
|
244
|
+
"more_itertools/more.pyi",
|
|
245
|
+
"docs/api.rst"
|
|
246
|
+
],
|
|
247
|
+
"evidence": {
|
|
248
|
+
"file": "docs/api.rst",
|
|
249
|
+
"pattern": "autofunction:: chunked"
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"id": "adv-int-lstrip-all",
|
|
254
|
+
"kind": "integration",
|
|
255
|
+
"expected": "implement",
|
|
256
|
+
"title": "Add lstrip_all(iterable, preds): strip leading items that match any of several predicates",
|
|
257
|
+
"body": "Please add `lstrip_all(iterable, preds)` to more_itertools.more that drops leading items for which any predicate in preds is true. It must be part of the public API like the other helpers.",
|
|
258
|
+
"must_touch": [
|
|
259
|
+
"more_itertools/more.py",
|
|
260
|
+
"more_itertools/more.pyi",
|
|
261
|
+
"docs/api.rst"
|
|
262
|
+
],
|
|
263
|
+
"evidence": {
|
|
264
|
+
"file": "docs/api.rst",
|
|
265
|
+
"pattern": "autofunction:: chunked"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"id": "adv-int-span-by",
|
|
270
|
+
"kind": "integration",
|
|
271
|
+
"expected": "implement",
|
|
272
|
+
"title": "Add span_by(iterable, key): split into the leading run sharing a key and the rest",
|
|
273
|
+
"body": "Please add `span_by(iterable, key)` to more_itertools.more that returns an iterator over the leading items that share the first item's key and an iterator over the remainder. It must be part of the public API like the other helpers.",
|
|
274
|
+
"must_touch": [
|
|
275
|
+
"more_itertools/more.py",
|
|
276
|
+
"more_itertools/more.pyi",
|
|
277
|
+
"docs/api.rst"
|
|
278
|
+
],
|
|
279
|
+
"evidence": {
|
|
280
|
+
"file": "docs/api.rst",
|
|
281
|
+
"pattern": "autofunction:: chunked"
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
]
|
|
285
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Feature benchmark (forge#5341)
|
|
2
|
+
|
|
3
|
+
The lane benchmark ([lightlane-bench.md](lightlane-bench.md)) grades one issue at a time. This one grades a whole feature: a spec goes
|
|
4
|
+
in, an app comes out, and hidden journey tests decide how much of it works.
|
|
5
|
+
|
|
6
|
+
## Specs
|
|
7
|
+
|
|
8
|
+
`docs/eval/feature-specs/<id>/` holds `spec.md` (the only thing an arm sees) and `journeys/*.mjs` (the oracle, never shown to an arm).
|
|
9
|
+
A journey is a script that exits 0 on a pass and reads the app checkout from `BENCH_APP`. Shipped: `crud-auth` (accounts and per-user
|
|
10
|
+
notes). Planned: a CLI with a plugin registry, a two-service queue pipeline, a small web app.
|
|
11
|
+
|
|
12
|
+
## Arms
|
|
13
|
+
|
|
14
|
+
| Arm | What runs |
|
|
15
|
+
|---|---|
|
|
16
|
+
| `full` | `arms.full.steps` (default: `forgedock bootstrap`, `orchestrate`, `release` on the sandbox repo; `{repo}`, `{spec}`, `{result}` are filled in), then a clone of the repo |
|
|
17
|
+
| `control` | one bare `claude -p <spec> --output-format json --model <model>` session in an empty directory |
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{"arms": {"full": {"repo": "acme/sandbox"}, "control": {"model": "claude-opus-5-5"}}}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Run
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
node scripts/bench-feature.mjs run --spec docs/eval/feature-specs/crud-auth --config cfg.json --out rows.jsonl
|
|
27
|
+
node scripts/bench-feature.mjs aggregate rows.jsonl [--previous last-scorecard.json]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Row: `journeys_passed`, `journeys_total`, `cost_usd`, `wall_ms`, `interventions`, `terminal`. The scorecard has per-arm metrics, the target
|
|
31
|
+
`full_journeys_ge_control` and `regression` (the full arm's journey pass rate fell below `--previous`). Exit 2 on a failed target or a regression.
|
|
32
|
+
|
|
33
|
+
## Per-release scorecard and the promotion gate
|
|
34
|
+
|
|
35
|
+
Publish the `aggregate` output for each release next to the lane benchmark (`docs/eval/`). A default-flag promotion that affects
|
|
36
|
+
milestone lanes must first pass `scoreboardGate({ bench, board })` (`bin/stats/scoreboard.mjs`): the latest scorecard has no
|
|
37
|
+
regression, and the shipped milestone's journeys (`forgedock stats --milestone <id>`) are not red. Real arm runs cost money and are never part of CI.
|
|
38
|
+
|
|
39
|
+
## Baselines
|
|
40
|
+
|
|
41
|
+
`forgedock stats --milestone <id|title> --repo <owner/repo>` records the scoreboard of a shipped milestone (journey status at ship,
|
|
42
|
+
first merge to first green journey, defects after the last child by class, rework share, interventions).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Hidden oracle: a user creates, edits and deletes a note, and a second user cannot see or touch it.
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { pathToFileURL } from "node:url";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
const { createApp } = await import(pathToFileURL(join(process.env.BENCH_APP, "app.mjs")).href);
|
|
6
|
+
const app = createApp();
|
|
7
|
+
const login = async (u) => {
|
|
8
|
+
await app.handle({ method: "POST", path: "/register", body: { username: u, password: "pw" } });
|
|
9
|
+
return { authorization: `Bearer ${(await app.handle({ method: "POST", path: "/login", body: { username: u, password: "pw" } })).body.token}` };
|
|
10
|
+
};
|
|
11
|
+
const a = await login("ann"), b = await login("bob");
|
|
12
|
+
assert.equal((await app.handle({ method: "POST", path: "/notes", body: { text: "x" } })).status, 401);
|
|
13
|
+
const made = await app.handle({ method: "POST", path: "/notes", headers: a, body: { text: "one" } });
|
|
14
|
+
assert.equal(made.status, 201);
|
|
15
|
+
const id = made.body.id;
|
|
16
|
+
assert.equal((await app.handle({ method: "GET", path: "/notes", headers: b })).body.length, 0);
|
|
17
|
+
assert.equal((await app.handle({ method: "PUT", path: `/notes/${id}`, headers: b, body: { text: "hijack" } })).status, 404);
|
|
18
|
+
assert.equal((await app.handle({ method: "PUT", path: `/notes/${id}`, headers: a, body: { text: "two" } })).status, 200);
|
|
19
|
+
assert.equal((await app.handle({ method: "GET", path: "/notes", headers: a })).body[0].text, "two");
|
|
20
|
+
assert.equal((await app.handle({ method: "DELETE", path: `/notes/${id}`, headers: a })).status, 200);
|
|
21
|
+
assert.equal((await app.handle({ method: "GET", path: "/notes", headers: a })).body.length, 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Hidden oracle: a user registers, logs in, and a bad password is refused. BENCH_APP is the app checkout.
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { pathToFileURL } from "node:url";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
const { createApp } = await import(pathToFileURL(join(process.env.BENCH_APP, "app.mjs")).href);
|
|
6
|
+
const app = createApp();
|
|
7
|
+
assert.equal((await app.handle({ method: "POST", path: "/register", body: { username: "ann", password: "pw1" } })).status, 201);
|
|
8
|
+
assert.equal((await app.handle({ method: "POST", path: "/register", body: { username: "ann", password: "pw1" } })).status, 409);
|
|
9
|
+
assert.equal((await app.handle({ method: "POST", path: "/login", body: { username: "ann", password: "bad" } })).status, 401);
|
|
10
|
+
const ok = await app.handle({ method: "POST", path: "/login", body: { username: "ann", password: "pw1" } });
|
|
11
|
+
assert.equal(ok.status, 200);
|
|
12
|
+
assert.ok(ok.body.token);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Notes service with accounts
|
|
2
|
+
|
|
3
|
+
Build a small in-memory notes service in plain Node (ESM, no dependencies, no network).
|
|
4
|
+
|
|
5
|
+
Write `app.mjs` in the repository root exporting `createApp()`, which returns `{ handle(req) }`. `handle` takes
|
|
6
|
+
`{ method, path, headers, body }` (body is an object or undefined) and resolves to `{ status, body }`.
|
|
7
|
+
|
|
8
|
+
Endpoints:
|
|
9
|
+
- `POST /register` with `{ username, password }`: 201, or 409 when the username exists, or 400 when a field is missing.
|
|
10
|
+
- `POST /login` with `{ username, password }`: 200 with `{ token }`, or 401 on bad credentials.
|
|
11
|
+
- `POST /notes` with `{ text }`: needs header `authorization: Bearer <token>`; 201 with `{ id, text }`; 401 without a valid token.
|
|
12
|
+
- `GET /notes`: the caller's own notes only, 200 with an array.
|
|
13
|
+
- `PUT /notes/:id` with `{ text }` and `DELETE /notes/:id`: 200 on the caller's note, 404 on anyone else's or an unknown id.
|
|
14
|
+
|
|
15
|
+
Passwords must not be stored or returned in clear text. Add a `README.md` saying how to run it.
|
|
@@ -206,7 +206,8 @@ Two milestones, a spike, four build issues and one needs-human issue. `INVITES`
|
|
|
206
206
|
"SPIKE"
|
|
207
207
|
],
|
|
208
208
|
"priority": "p0",
|
|
209
|
-
"body": "## Problem\n\nScaffold the Next.js app with pnpm and a CI workflow.\n\n## Root Cause (if known)\n\nGreenfield: not built yet.\n\n## Affected Files\n\n1. `package.json` — new\n2. `app/layout.tsx` — new\n3. `.github/workflows/ci.yml` — new\n\n## Acceptance Criteria\n\n- [ ] `pnpm build` succeeds [type:unit]\n\n## Context\n\n**Parent**: #{{SPIKE}}\n\n## Dependencies\n\nDepends on #{{SPIKE}} — needs the stack decision\n"
|
|
209
|
+
"body": "## Problem\n\nScaffold the Next.js app with pnpm and a CI workflow.\n\n## Root Cause (if known)\n\nGreenfield: not built yet.\n\n## Affected Files\n\n1. `package.json` — new\n2. `app/layout.tsx` — new\n3. `.github/workflows/ci.yml` — new\n\n## Acceptance Criteria\n\n- [ ] `pnpm build` succeeds [type:unit]\n- [ ] The project builds, boots, and one acceptance journey passes on the thinnest real path [type:e2e]\n\n## Context\n\n**Parent**: #{{SPIKE}}\n\n## Dependencies\n\nDepends on #{{SPIKE}} — needs the stack decision\n",
|
|
210
|
+
"skeleton": true
|
|
210
211
|
},
|
|
211
212
|
{
|
|
212
213
|
"key": "DB",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "forgedock",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.54.0",
|
|
4
|
+
"description": "An AI engineering team that ships to production",
|
|
5
5
|
"bin": {
|
|
6
6
|
"forgedock": "bin/forgedock.mjs"
|
|
7
7
|
},
|
|
@@ -42,6 +42,9 @@
|
|
|
42
42
|
"!docs/site/.vitepress/",
|
|
43
43
|
"examples/",
|
|
44
44
|
"packages/protocol/src/",
|
|
45
|
+
"plugins/forgedock-splash/",
|
|
46
|
+
"!plugins/forgedock-splash/tests/",
|
|
47
|
+
".claude-plugin/marketplace.json",
|
|
45
48
|
"scripts/",
|
|
46
49
|
"templates/",
|
|
47
50
|
"LICENSE",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "forgedock-splash",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "ForgeDock's startup splash for Claude Code: the F mark is forged, Clawd bonks it, sparks fly, and it settles on 'supercharged' before clearing.",
|
|
5
|
+
"author": { "name": "RapierCraft Studios" },
|
|
6
|
+
"homepage": "https://github.com/RapierCraftStudios/ForgeDock",
|
|
7
|
+
"repository": "https://github.com/RapierCraftStudios/ForgeDock",
|
|
8
|
+
"license": "AGPL-3.0",
|
|
9
|
+
"types": "./types/index.d.ts"
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# forgedock-splash
|
|
2
|
+
|
|
3
|
+
A startup splash for ForgeDock users in Claude Code. When an interactive terminal session starts, the row above the prompt plays a short (about 6.5 s) scene: the ForgeDock "F" mark is forged white-hot and cools to chrome, Clawd walks in under the top bar, jumps and bonks it, sparks fly and a shine ring crosses the mark, the `F O R G E D O C K` wordmark types in, and it settles on `» supercharged` before the row clears.
|
|
4
|
+
|
|
5
|
+
It changes nothing else: no commands, prompts, tools or settings.
|
|
6
|
+
|
|
7
|
+
## Behaviour
|
|
8
|
+
|
|
9
|
+
- Plays on a fresh launch only: not after `/clear` and not on a resumed session.
|
|
10
|
+
- Stops at once when you submit a prompt, and skips itself when the terminal is narrower than 56 columns or shorter than 9 rows.
|
|
11
|
+
- Follows Claude Code's `theme` setting: a darker palette on light themes.
|
|
12
|
+
- Draws nothing in `claude -p` or SDK runs.
|
|
13
|
+
|
|
14
|
+
## Install and turn off
|
|
15
|
+
|
|
16
|
+
`npx forgedock` installs it by default at user scope (through a local `forgedock-local` marketplace under `~/.forge`) when the `claude` CLI is on PATH, and refreshes it on every re-run. Skip it with `npx forgedock --no-splash` or `FORGEDOCK_NO_SPLASH=1`; a plugin you disabled is never re-enabled. `npx forgedock uninstall` removes it.
|
|
17
|
+
|
|
18
|
+
Manual install:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
/plugin marketplace add RapierCraftStudios/ForgeDock
|
|
22
|
+
/plugin install forgedock-splash@forgedock
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Turn it off with `/plugin disable forgedock-splash` (or uninstall it).
|
|
26
|
+
|
|
27
|
+
It uses Claude Code's plugin hooks module API (early access); on Claude Code versions without it, the plugin does nothing.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "modules": ["./register.tsx"] }
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Copyright (c) RapierCraft Studios
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3
|
+
import { atom, read, update } from 'claude-code'
|
|
4
|
+
import type { Register } from 'claude-code'
|
|
5
|
+
import type { Frame } from '../types'
|
|
6
|
+
import { LAST, MIN_COLUMNS, MIN_ROWS, TICK, scene, setTheme } from './scene'
|
|
7
|
+
|
|
8
|
+
// -1 = hidden. Frames advance every TICK ms; the band clears after the last one.
|
|
9
|
+
const frame = atom({ plugin: 'forgedock-splash', key: 'frame' } as const, -1 as Frame)
|
|
10
|
+
|
|
11
|
+
export const register: Register = on => {
|
|
12
|
+
// Play on a fresh launch only: not after /clear, not on a resumed session.
|
|
13
|
+
let skipNext = false
|
|
14
|
+
on('session.end', ($, e, next) => {
|
|
15
|
+
if (e.reason === 'clear') skipNext = true
|
|
16
|
+
return next(e)
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
on('session.start', async ($, e, next) => {
|
|
20
|
+
const result = await next(e)
|
|
21
|
+
if (e.surface !== 'terminal' || !e.isInteractive) return result
|
|
22
|
+
if (skipNext) {
|
|
23
|
+
skipNext = false
|
|
24
|
+
return result
|
|
25
|
+
}
|
|
26
|
+
const { startedAt } = await $.session.usage()
|
|
27
|
+
if ((await $.clock.now()) - startedAt > 15_000) return result // a resumed session
|
|
28
|
+
|
|
29
|
+
const theme = (await $.config.list()).find(row => row.key === 'theme')?.value
|
|
30
|
+
setTheme(typeof theme === 'string' && theme.startsWith('light'))
|
|
31
|
+
|
|
32
|
+
await update($, frame, () => 0)
|
|
33
|
+
const timer = $.clock.every(TICK, async () => {
|
|
34
|
+
const f = await read($, frame)
|
|
35
|
+
if (f < 0 || f >= LAST) {
|
|
36
|
+
timer.cancel()
|
|
37
|
+
await update($, frame, () => -1)
|
|
38
|
+
return
|
|
39
|
+
}
|
|
40
|
+
await update($, frame, () => f + 1)
|
|
41
|
+
})
|
|
42
|
+
return result
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
|
|
46
|
+
const f = await read($, frame)
|
|
47
|
+
if (f < 0 || e.props.hasSurvey) return next(e)
|
|
48
|
+
// Get out of the way: once work starts, or when the band is too small to draw the scene whole.
|
|
49
|
+
if (e.props.isWorking || e.props.bodyColumns < MIN_COLUMNS || e.props.maxRows < MIN_ROWS) {
|
|
50
|
+
await update($, frame, () => -1)
|
|
51
|
+
return next(e)
|
|
52
|
+
}
|
|
53
|
+
const { Box, Text } = $.ui.resolve(e)
|
|
54
|
+
return (
|
|
55
|
+
<Box flexDirection="column">
|
|
56
|
+
{scene(f).map((runs, r) => (
|
|
57
|
+
<Box key={`r${r}`}>
|
|
58
|
+
{runs.length === 0 ? (
|
|
59
|
+
<Text>{' '}</Text>
|
|
60
|
+
) : (
|
|
61
|
+
runs.map((run, i) =>
|
|
62
|
+
run.color ? (
|
|
63
|
+
<Text key={`t${i}`} color={run.color} bold={run.bold}>{run.text}</Text>
|
|
64
|
+
) : (
|
|
65
|
+
<Text key={`t${i}`}>{run.text}</Text>
|
|
66
|
+
),
|
|
67
|
+
)
|
|
68
|
+
)}
|
|
69
|
+
</Box>
|
|
70
|
+
))}
|
|
71
|
+
</Box>
|
|
72
|
+
)
|
|
73
|
+
})
|
|
74
|
+
}
|