Repository navigation
Explorations: one place chooses the capture strategy, and ARCHITECTURE describes strategies - #76
Draft
brentvatne wants to merge 4 commits into
Draft
brentvatne wants to merge 4 commits into
brentvatne wants to merge 4 commits into
Conversation
…he explorer
binary/strategy.ts holds what explore:binary and explore:session each branched on: chooseStrategy
checks the options before any device starts (a model, a replay plan or a flows file),
strategyInputs reads the {{secret:NAME}} inputs they need, and startStrategy returns the session
that drives the explorer's tools, with how the report names it. A new strategy is one more case
there. assertAppUrl moves to binary/app-url.ts so strategy.ts does not import run.ts.
… describes capture strategies shared/controller-cache, capture/local-simulator and ci/baseline-wait imported them from binary/archive, a layer above them. ARCHITECTURE now lists binary/ as a layer, and a new section says what a strategy decides and what the host (route-capture in a review, the explorer in an exploration) owns.
|
Viewer preview of 6394778 · reports from brentvatne/euxy#163
The link stays the same on every push. Deploy run |
… access by platform, counts turns, and hands the explorer the checkpoints a flows run never attempted
…nputs wait for the session's platform on a flows run runSessionExploration now chooses its strategy before it knows the platform, so the #74 change is ported onto strategyInputs: a flows run without --platform reads its secrets once the session reports its platform.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #74. It makes the exploration side of Explore modular: a capture strategy is one case in one place, and
ARCHITECTURE.mdsays what a strategy decides and what the host owns. It changes no behaviour.What and why
One place chooses the strategy.
explore:binaryandexplore:sessioneach picked a strategy with the same branch:src/binary/strategy.tsnow holds that choice in three functions:chooseStrategy(options)checks the options before any device starts. It returns a model, a replay plan or a flows file, and refuses options that would do nothing.strategyInputs(choice, hints, environment)reads the{{secret:NAME}}inputs the strategy types.startStrategy(choice, …)returns anExplorationStrategy: the session that drives the explorer's tools, how the report names it, and whether it takes the flow tools.A new strategy is one more case of
StrategyChoice. The model-session code moves out ofrun.tswith these functions, andassertAppUrlmoves tobinary/app-url.ts, sostrategy.tsdoesn't importrun.ts.The archive readers move down a layer. Three modules imported the tar.gz and zip readers from
binary/archive.ts, a layer above them:shared/controller-cache,capture/local-simulatorandci/baseline-wait. The readers now live insrc/shared/archive-entries.ts.binary/archive.tskeeps what is specific to apps: plists, manifests, icons and the iOS bundle.ARCHITECTURE.md:
binary/as a folder and a layer, with its real imports;Screenshots
No visible change.
Code examples
No change to usage. A strategy is added in
binary/strategy.ts:Try it
Run the flows from #74 on a simulator build. Its strategy is chosen and started through the new module:
Testing
e2ebuild:chooseStrategy's refusals, which had none:FLOWS_WITH_REPLAY,FLOWS_OPTIONS_IGNORED,REPLAY_OPTIONS_IGNORED, and anhttps:URL in a flows file.strategy.ts:ExplorationStrategy.flowsnames the checkpoints a flows run never attempted, for the explorer to record as missing.explore:sessionwithout--platform, a flows run'sstrategyInputsnow waits for the session to report its platform.npm testpasses (1734 tests), andnpm run typecheckis clean. Lint shows only the 6 existing Viewer warnings.Not in this PR
capture:review), and flows in reviews.🤖 Generated with Claude Code