Repository navigation
feat: unified compute entry (exfa/compute@1), FitSpec shorthand, projected select - #10
Merged
Merged
Conversation
…ected select
docs/27 §5.3/5.5 — one input object, one output object; batch stays a
first-class operation of the same media; workspaces/groups never reach the
engine.
- compute.rs: `compute` RPC method + compute_json() (never panics) +
`exfa compute [FILE]` CLI. exfa/compute@1 {operation:calc|batch} ->
exfa/compute-result@1 {result|error} (UNSUPPORTED_FORMAT / BAD_REQUEST /
BAD_JSON envelopes, inner errors wrapped).
- FitSpec shorthand normalization, engine-side only, recursive into
projected[kind=fit].fit / fleet.booster_fits / scenarios[].target.fit:
skills.default_level -> 5, module state -> active when the type can
activate else online, drone active -> quantity. Explicit values win;
calc reports DEFAULTED adjustments, batch normalizes silently pre-expansion
(patches act on the normalized base).
- model: id? on ModuleReq/DroneReq/FighterReq; projected[kind=fit].select
{module_ids,drone_ids,fighter_ids} = strict per-kind whitelist of the
fully-built source fit's items; absent kind list contributes nothing;
unmatched ids -> warnings. select ignored (warned) on non-fit kinds.
- contract/CONTRACT.md: new `compute` section; contract_version unchanged.
Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.
docs/27 §5.3/5.5 — the engine-side half of the unified compute design. One input object, one output object:
operation=calctakes a FitSpec,operation=batchtakes the existing BatchRequest; batch remains a first-class operation, workspaces/groups never reach the engine.computeRPC +compute_json+exfa compute [FILE]CLI; WASM picks it up viaexfa_core::rpcwith zero changesskills.default_level→ 5, omitted modulestate→ active-if-activatable else online, omitted droneactive→ quantity. Explicit values win;DEFAULTEDadjustments on calcbase/fits[].fitnormalized before expansion — patches act on a normalized baseprojected[kind=fit].select= strict per-kind whitelist by stable itemid; source fit still built completely; unmatched ids → warningscomputesection;contract_versionunchangedTest plan
cargo test -p exfa-core— all suites green incl. newtests/compute.rs(8 tests: shorthand↔explicit, explicit-wins, batch echo/equivalence, select whitelist, error envelopes)cargo buildcore/cli/wasmGenerated with Devin