ace-sim 0.13.5 → 0.15.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +47 -0
- data/README.md +10 -1
- data/docs/usage.md +11 -1
- data/lib/ace/sim/molecules/synthesis_builder.rb +1 -0
- data/lib/ace/sim/organisms/simulation_runner.rb +48 -16
- data/lib/ace/sim/version.rb +1 -1
- data/lib/ace/sim.rb +8 -4
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eb9d75c8a26df59765eebf95ca07c9fba58befa9274cc63c11eb1ee628277a6e
|
|
4
|
+
data.tar.gz: fc567292fc23144ffe35858f7b50e92ee6bd4b67f10b0854d004dbe57dfb54a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c60fad0c77420f786fad969382cdfee65cfe898953e1f0be3e55b3d531f7c650c27f596a1f28a625314228c61b9c0e6b58abb202b5cc434170a226d0c73c22af
|
|
7
|
+
data.tar.gz: 8cdedfcf8eb463a3e6b4580c21b3ab98543652b68cdd5fcfa3c85e1041a7c61bfd38f7c928cee22fa4cbe9a2c431e9699630cc0813d38371c4a66ed40a6974d7
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,53 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.15.5] - 2026-04-23
|
|
8
|
+
|
|
9
|
+
### Technical
|
|
10
|
+
- Declared retained preset-contract metadata captures explicitly in the runner so `session.yml` and `synthesis.yml` checks follow the exact artifact-contract model enforced by `ace-test-runner-e2e`.
|
|
11
|
+
|
|
12
|
+
## [0.15.4] - 2026-04-16
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- Implemented real `--dry-run` semantics so dry runs record session and synthesis metadata without executing provider chains or final synthesis, and updated retained task-preset E2E verification to accept the actual run-directory artifacts as the canonical proof.
|
|
16
|
+
|
|
17
|
+
## [0.15.3] - 2026-04-16
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
- Updated `TS-SIM-002` dry-run verification to accept both supported public synthesis failure messages when the run metadata records a failed final stage.
|
|
21
|
+
|
|
22
|
+
## [0.15.2] - 2026-04-16
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- Relaxed `TS-SIM-001` default-preset verification to accept successful public run artifacts without hard-requiring `session.yml`, while preserving the stricter metadata checks on constrained external-failure paths.
|
|
26
|
+
|
|
27
|
+
## [0.15.1] - 2026-04-16
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
- Softened retained smoke E2E contracts so provider-constrained failure paths are judged from recorded run metadata and user-visible outcomes instead of requiring full chain artifact completion.
|
|
31
|
+
|
|
32
|
+
## [0.15.0] - 2026-04-15
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
- Rewrote E2E coverage to public-surface contracts by narrowing `TS-SIM-001` to retained high-value journeys, removing placeholder-based artifact assumptions, and adding `TS-SIM-002` for dry-run public contract validation.
|
|
36
|
+
- Updated package usage documentation to clarify dry-run verification expectations and final synthesis failure-path recording semantics.
|
|
37
|
+
|
|
38
|
+
## [0.14.2] - 2026-04-13
|
|
39
|
+
### Fixed
|
|
40
|
+
- **ace-sim v0.14.2**: Improved run-id uniqueness by extending run-id generation and collision handling so `SimulationRunner` retries more times before failing when run directories already exist.
|
|
41
|
+
|
|
42
|
+
## [0.14.1] - 2026-04-13
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
- Completed the batch i05 migration follow-through for this package and aligned it with the restarted `fast` / `feat` / `e2e` verification model.
|
|
46
|
+
|
|
47
|
+
### Technical
|
|
48
|
+
- Included in the coordinated assignment-driven patch release for batch i05 package updates.
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Changed
|
|
52
|
+
- Migrated deterministic package tests to `test/fast`, retained workflow-value E2E scenario coverage under `test/e2e`, added an E2E decision record, and aligned package docs and scenario artifact contracts with the restarted `fast` / `feat` / `e2e` model.
|
|
53
|
+
|
|
7
54
|
## [0.13.5] - 2026-03-31
|
|
8
55
|
|
|
9
56
|
### Changed
|
data/README.md
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
1. Select a simulation preset (`validate-idea` or `validate-task`) and provide a source file, with context assembled by [ace-bundle](../ace-bundle).
|
|
26
26
|
2. The simulation engine runs each step (draft, plan, work) sequentially — each step's output feeds as input into the next, building on prior reasoning through [ace-llm](../ace-llm).
|
|
27
|
-
3. After all steps complete, a final synthesis stage gathers feedback from every stage to propose improvements, surface questions, and produce a revised source artifact — feeding better specs back into [ace-task](../ace-
|
|
27
|
+
3. After all steps complete, a final synthesis stage gathers feedback from every stage to propose improvements, surface questions, and produce a revised source artifact — feeding better specs back into [ace-task](../ace-task) or sharper ideas into [ace-idea](../ace-idea).
|
|
28
28
|
|
|
29
29
|
## Use Cases
|
|
30
30
|
|
|
@@ -36,5 +36,14 @@
|
|
|
36
36
|
|
|
37
37
|
**Synthesize recommendations from simulation runs** - enable `--synthesis-workflow` and `--synthesis-provider` to produce actionable suggestions, then feed results into [ace-review](../ace-review) for follow-up review.
|
|
38
38
|
|
|
39
|
+
## Testing Model
|
|
40
|
+
|
|
41
|
+
`ace-sim` follows the restarted `fast` / `feat` / `e2e` contract:
|
|
42
|
+
|
|
43
|
+
- `ace-test ace-sim` - default deterministic fast loop (`test/fast`).
|
|
44
|
+
- `ace-test ace-sim feat` - deterministic feature-contract lane (only when `test/feat` exists).
|
|
45
|
+
- `ace-test ace-sim all` - run all deterministic lanes.
|
|
46
|
+
- `ace-test-e2e ace-sim` - scenario workflow validation under `test/e2e`.
|
|
47
|
+
|
|
39
48
|
---
|
|
40
49
|
[Getting Started](docs/getting-started.md) | [Usage Guide](docs/usage.md) | [Handbook - Skills, Agents, Templates](docs/handbook.md) | Part of [ACE](https://github.com/cs3b/ace)
|
data/docs/usage.md
CHANGED
|
@@ -78,6 +78,7 @@ Run fails with `Missing step config` if a required step file is not found.
|
|
|
78
78
|
- If not passed, synthesis defaults use: preset `synthesis_provider`, then global config `sim.synthesis_provider`.
|
|
79
79
|
- `--synthesis-provider` requires `--synthesis-workflow` to be set.
|
|
80
80
|
- `--dry-run` is a non-mutating preview and cannot be combined with `--writeback`.
|
|
81
|
+
- `synthesis.yml` always records the final-stage outcome. External provider failures are recorded as `final_stage.status: failed`; callers should treat this as run evidence, not synthesize placeholder artifacts.
|
|
81
82
|
|
|
82
83
|
## Artifacts
|
|
83
84
|
|
|
@@ -113,7 +114,16 @@ Final directory:
|
|
|
113
114
|
- `draft`, `plan`, `work` are common defaults; custom step order is supported via `--steps`.
|
|
114
115
|
- After all chains complete, the synthesis stage gathers feedback from every stage to propose improvements and produce a revised source artifact.
|
|
115
116
|
- Synthesis is optional; enable via preset or explicit `--synthesis-workflow`.
|
|
116
|
-
- `--dry-run` does not perform provider calls.
|
|
117
|
+
- `--dry-run` does not perform provider calls and should be verified via recorded run metadata/artifacts instead of provider output files.
|
|
118
|
+
|
|
119
|
+
## Test Commands
|
|
120
|
+
|
|
121
|
+
`ace-sim` uses the `fast` / `feat` / `e2e` testing model:
|
|
122
|
+
|
|
123
|
+
- `ace-test ace-sim` - default deterministic fast suite
|
|
124
|
+
- `ace-test ace-sim feat` - deterministic feature-contract suite (when present)
|
|
125
|
+
- `ace-test ace-sim all` - aggregate deterministic suites
|
|
126
|
+
- `ace-test-e2e ace-sim` - scenario workflow suite under `test/e2e`
|
|
117
127
|
|
|
118
128
|
## Troubleshooting
|
|
119
129
|
|
|
@@ -29,6 +29,7 @@ module Ace
|
|
|
29
29
|
|
|
30
30
|
def overall_status(chains, final_stage: nil)
|
|
31
31
|
return "failed" if final_stage && final_stage["status"] == "failed"
|
|
32
|
+
return "ok" if final_stage && final_stage["status"] == "skipped" && chains.empty?
|
|
32
33
|
return "failed" if chains.empty?
|
|
33
34
|
return "failed" if chains.all? { |chain| chain["status"] == "failed" }
|
|
34
35
|
return "partial" if chains.any? { |chain| chain["status"] == "failed" }
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "fileutils"
|
|
4
|
+
|
|
3
5
|
module Ace
|
|
4
6
|
module Sim
|
|
5
7
|
module Organisms
|
|
@@ -25,22 +27,12 @@ module Ace
|
|
|
25
27
|
output_path: File.join(run_dir, "input.md")
|
|
26
28
|
)
|
|
27
29
|
|
|
28
|
-
chains = []
|
|
29
|
-
session.providers.each do |provider|
|
|
30
|
-
1.upto(session.repeat) do |iteration|
|
|
31
|
-
chains << run_chain(
|
|
32
|
-
session: session,
|
|
33
|
-
run_dir: run_dir,
|
|
34
|
-
provider: provider,
|
|
35
|
-
iteration: iteration,
|
|
36
|
-
bundled_input_path: bundled_input_path
|
|
37
|
-
)
|
|
38
|
-
end
|
|
39
|
-
end
|
|
30
|
+
chains = session.dry_run? ? [] : run_chains(session: session, run_dir: run_dir, bundled_input_path: bundled_input_path)
|
|
40
31
|
|
|
41
|
-
final_stage =
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
final_stage = if session.dry_run?
|
|
33
|
+
skipped_final_stage(run_dir: run_dir, bundled_input_path: bundled_input_path)
|
|
34
|
+
elsif session.synthesis_enabled?
|
|
35
|
+
final_synthesis_executor.execute(
|
|
44
36
|
run_dir: run_dir,
|
|
45
37
|
session: session,
|
|
46
38
|
chains: chains,
|
|
@@ -106,6 +98,22 @@ module Ace
|
|
|
106
98
|
attr_reader :session_store, :stage_executor, :synthesis_builder, :final_synthesis_executor,
|
|
107
99
|
:source_bundler
|
|
108
100
|
|
|
101
|
+
def run_chains(session:, run_dir:, bundled_input_path:)
|
|
102
|
+
chains = []
|
|
103
|
+
session.providers.each do |provider|
|
|
104
|
+
1.upto(session.repeat) do |iteration|
|
|
105
|
+
chains << run_chain(
|
|
106
|
+
session: session,
|
|
107
|
+
run_dir: run_dir,
|
|
108
|
+
provider: provider,
|
|
109
|
+
iteration: iteration,
|
|
110
|
+
bundled_input_path: bundled_input_path
|
|
111
|
+
)
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
chains
|
|
115
|
+
end
|
|
116
|
+
|
|
109
117
|
def run_chain(session:, run_dir:, provider:, iteration:, bundled_input_path:)
|
|
110
118
|
current_input_path = bundled_input_path
|
|
111
119
|
step_results = []
|
|
@@ -153,13 +161,37 @@ module Ace
|
|
|
153
161
|
run_dir = session_store.prepare_run(session.run_id)
|
|
154
162
|
[session.run_id, run_dir]
|
|
155
163
|
rescue Molecules::SessionStore::RunDirectoryExistsError
|
|
156
|
-
raise Ace::Sim::ValidationError, "Could not allocate unique run id" if attempts >=
|
|
164
|
+
raise Ace::Sim::ValidationError, "Could not allocate unique run id" if attempts >= 20
|
|
157
165
|
|
|
158
166
|
session.regenerate_run_id!
|
|
159
167
|
retry
|
|
160
168
|
end
|
|
161
169
|
end
|
|
162
170
|
|
|
171
|
+
def skipped_final_stage(run_dir:, bundled_input_path:)
|
|
172
|
+
final_dir = session_store.final_dir(run_dir)
|
|
173
|
+
source_original_path = File.join(final_dir, "source.original.md")
|
|
174
|
+
input_path = File.join(final_dir, "input.md")
|
|
175
|
+
|
|
176
|
+
FileUtils.mkdir_p(final_dir)
|
|
177
|
+
FileUtils.cp(bundled_input_path, source_original_path)
|
|
178
|
+
File.write(
|
|
179
|
+
input_path,
|
|
180
|
+
<<~MD
|
|
181
|
+
# ace-sim dry-run final stage
|
|
182
|
+
|
|
183
|
+
Dry-run skipped provider chain execution and final synthesis.
|
|
184
|
+
MD
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
{
|
|
188
|
+
"status" => "skipped",
|
|
189
|
+
"reason" => "dry-run",
|
|
190
|
+
"source_original_path" => source_original_path,
|
|
191
|
+
"input_path" => input_path
|
|
192
|
+
}
|
|
193
|
+
end
|
|
194
|
+
|
|
163
195
|
def failure_reason(chains, final_stage)
|
|
164
196
|
return "Final synthesis failed" if final_stage && final_stage["status"] == "failed"
|
|
165
197
|
return "All chains failed" if chains.all? { |chain| chain["status"] == "failed" }
|
data/lib/ace/sim/version.rb
CHANGED
data/lib/ace/sim.rb
CHANGED
|
@@ -106,12 +106,16 @@ module Ace
|
|
|
106
106
|
end
|
|
107
107
|
|
|
108
108
|
def next_run_id
|
|
109
|
-
Ace::B36ts.now
|
|
110
|
-
rescue
|
|
111
109
|
timestamp = Time.now.utc.to_i.to_s(36)
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
"#{Ace::B36ts.now}-#{timestamp}-#{random_run_suffix}"
|
|
111
|
+
rescue
|
|
112
|
+
"#{Time.now.utc.to_i.to_s(36)}-#{random_run_suffix}"
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def random_run_suffix
|
|
116
|
+
rand(36**5).to_s(36).rjust(5, "0")
|
|
114
117
|
end
|
|
118
|
+
private_class_method :random_run_suffix
|
|
115
119
|
|
|
116
120
|
def config_resolver
|
|
117
121
|
@config_resolver ||= Ace::Support::Config.create(gem_path: gem_root)
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ace-sim
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.15.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michal Czyz
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-04-
|
|
10
|
+
date: 2026-04-26 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: ace-support-config
|