12 KiB
作成
LocalTicketBackend によって作成されました。
Plan
Intake refinement
Readiness: implementation_ready。
重複確認: .yoi/tickets 内で profile.import / import/extend / global yoi に関する未完了の重複 Ticket は見つからなかった。
Open questions: blocking な未決定点はない。require("yoi") / require("yoi.*") を互換 alias として残すか非推奨にするかは、Ticket 本文どおり実装時に整理し、テストで固定する implementation latitude として扱う。
Risk flags / reviewer focus: profile-api, authority-boundary, sandbox-module-loading, backward-compat, packaging-resource。
Orchestrator routing: queued 後は implementation に進めてよい。実装では Lua Profile sandbox の global 注入、builtin/raw Profile artifact import、extend merge semantics、validation boundary、bundled resources/profiles/default.lua 更新、manifest crate テストを一体で確認すること。
Intake summary
既存 Ticket 00001KTR6D3C5 を確認し、Lua Profile の global yoi API 注入、yoi.profile.import/extend、deep merge semantics、Profile validation boundary、default.lua 移行、local require 維持、manifest crate tests まで受け入れ条件が揃っていると判断した。blocking open question はない。require("yoi") / require("yoi.*") の扱いは実装時に固定する implementation latitude。主な risk flags は profile-api / authority-boundary / sandbox-module-loading / backward-compat / packaging-resource。
State changed
Intake により implementation_ready と判断したため、state を ready にする。実装開始は panel による ready -> queued と Orchestrator routing に委ねる。
State changed
Ticket を workspace-panel が queued にしました。
State changed
Queue acceptance: relation query has no blockers, existing orchestration plan only has the prior human-gate waiting note, workspace is clean, and user explicitly requested continuing inprogress/queued consumption. Implementation side effects will proceed in a dedicated worktree/branch with review before merge-completion.
Plan
Routing decision: implementation_ready
Reason:
- Ticket is
queued, relation query has no blockers, and existing orchestration plan only contains a prior human-gate waiting note. - User explicitly requested continuing inprogress/queued work; this satisfies the prior human gate.
- The Ticket contains clear binding requirements, acceptance criteria, non-goals, and reviewer focus.
Evidence checked:
- Ticket body/thread/artifacts.
TicketRelationQuery: no relations/blockers.TicketOrchestrationPlanQuery: one waiting note from prior target-unspecified routing pass.- Current workspace state is clean; existing inprogress worktrees use separate branches/scopes.
- Code map target:
crates/manifest/src/profile.rs, Lua Profile helper/builtin loading paths,resources/profiles/default.lua, and manifest crate profile tests.
IntentPacket:
- Intent: make reusable Lua Profiles feel like a small DSL by injecting global
yoihelpers and adding raw Profile artifact import/extend composition. - Binding decisions / invariants: Profiles remain Lua-first reusable recipes only; import/extend must not import resolved runtime Manifest or allow runtime-bound/concrete authority fields; final artifact still goes through existing Profile validation; project-local
require("_base")keeps working; no tombstone/nil deletion semantics in this Ticket; bundled default Profile moves to globalyoistyle. - Requirements / acceptance criteria: filesystem and embedded Profiles can access global
yoi;yoi.profile.import("builtin:default")returns a raw Profile artifact;yoi.profile.extend("builtin:default", overrides)deep-merges nested tables while replacing scalars/lists; validation rejects runtime-bound or concrete authority contamination; require alias handling is fixed by tests; manifest targeted tests pass. - Implementation latitude: decide whether legacy
require("yoi")/require("yoi.*")aliases remain supported or are deprecated, but fix the behavior in tests; local organization and helper names may vary if the publicyoi.profile.import/extendsurface is preserved. - Escalate if implementation requires changing Profile authority boundaries, permitting resolved Manifest import, changing runtime startup semantics, or adding deletion/tombstone semantics.
- Validation:
cargo fmt,cargo test -p manifest profile --libor narrower named tests plus broader manifest tests,target/debug/yoi ticket doctor, andnix build .#yoibefore merge because runtime resources/Profile evaluation/package resources are touched.
Implementation report
Implementation report
Branch/worktree: lua-profile-yoi-api / .worktree/lua-profile-yoi-api
Commit:
4e1a08c2 feat: add yoi profile lua api
Summary:
- Injected global
yoiinto Lua Profile evaluation so filesystem and embedded Profiles can useyoi.profile,yoi.models,yoi.compact, andyoi.scopewithout localrequireboilerplate. - Changed
yoi.profile/require("yoi.profile")into a callable table, preserving legacylocal profile = require("yoi.profile"); return profile { ... }behavior while addingyoi.profile.importandyoi.profile.extend. - Added
yoi.profile.import("builtin:default")for raw builtin Profile artifact import andyoi.profile.extend("builtin:default", overrides)with recursive object merge and scalar/list replacement semantics. - Kept final resolved artifact behind existing reusable Profile validation; an extend override containing runtime-bound
podis rejected. - Updated bundled
resources/profiles/default.luato globalyoistyle. - Added tests for import/extend, validation boundary, host modules/local require, and builtin default evaluation.
Validation run in branch:
cargo fmtcargo test -p manifest global_yoi_import_and_extend_builtin_profile --libpassed.cargo test -p manifest global_yoi_extend_keeps_profile_validation_boundary --libpassed.cargo test -p manifest host_modules_and_local_require_work --libpassed.cargo test -p manifest builtin_default_resolves_without_external_evaluator --libpassed.cargo check -p manifestpassed.git diff --checkpassed.
Notes:
nix build .#yoinot yet run on this branch; Orchestrator should run it before merge because runtime resources/Profile evaluation/package resources are touched.- Import support is currently explicit for
builtin:default; broad user/project selector import can be added as a follow-up if desired, but this covers the requested builtin composition surface and preserves authority boundaries.
Review: approve
Branch-local review verdict: approve
Blockers: none.
Evidence:
- Diff from
developmerge-base touches onlycrates/manifest/src/profile.rsandresources/profiles/default.lua. - Global
yoiis available for filesystem and embedded builtin Profiles. require("yoi"),require("yoi.profile"),require("yoi.models"), and localrequire("shared")behavior are covered by tests and preserved.yoi.profile.import("builtin:default")evaluates the builtin default Lua as a raw Profile artifact, not a resolved Manifest.yoi.profile.extend("builtin:default", overrides)recursively merges objects and replaces non-object values; final artifacts still pass through existing Profile validation.- Runtime-bound field contamination is rejected by a
podoverride test; existing validation tests continue coveringscope.allow/scope.denyand absolute path boundaries. - Bundled
resources/profiles/default.luauses globalyoistyle.
Validation run by reviewer:
cargo test -p manifest profile --libpassed (22 passed).cargo check -p manifestpassed.git diff --check $(git merge-base HEAD develop)..HEADpassed.nix build .#yoipassed.
Non-blocking notes:
- Import/extend currently supports
builtin:defaultand aliasdefault; this matches the recorded known scope note. - List replacement does not have a dedicated assertion, but implementation treats JSON arrays as non-object values and therefore replaces them.
This is branch-local review evidence; final main-branch approval/close belongs to merge-completion.
Review: approve
Main-branch review/merge-completion approval.
Verified before merge:
- Branch-local reviewer approved with no blockers.
- Merge target matched branch
lua-profile-yoi-api/ worktree.worktree/lua-profile-yoi-apiand implementation commit4e1a08c2. - Diff touches
crates/manifest/src/profile.rsandresources/profiles/default.luaas expected.
Merged:
git merge --no-ff lua-profile-yoi-api -m "merge: lua profile yoi api"- Merge commit:
15dc176e merge: lua profile yoi api
Post-merge validation:
cargo fmt --checkpassed.git diff --checkpassed.cargo test -p manifest profile --libpassed (22 passed).cargo check -p manifestpassed.target/debug/yoi ticket doctorpassed.- typed
TicketDoctorreported 0 errors and 3 pre-existing diagnostics. nix build .#yoipassed.
Result: approve.
State changed
Merged branch lua-profile-yoi-api with merge commit 15dc176e; branch-local review approved and post-merge validation passed (cargo fmt --check, git diff --check, cargo test -p manifest profile --lib, cargo check -p manifest, target/debug/yoi ticket doctor, nix build .#yoi).
State changed
Ticket を closed にしました。
完了
完了しました。
実施内容:
- Lua Profile evaluator に global
yoiを注入しました。 yoi.profile/require("yoi.profile")は callable table になり、既存のlocal profile = require("yoi.profile"); return profile { ... }互換を保ちながらimport/extendを提供します。yoi.profile.import("builtin:default")は resolved Manifest ではなく raw builtin Profile artifact を返します。yoi.profile.extend("builtin:default", overrides)は object を再帰 merge し、scalar/list など non-object は置換します。- 最終 artifact は既存 Profile validation に通され、runtime-bound field(例:
pod)の混入は reject されます。 resources/profiles/default.luaを globalyoistyle に更新しました。
Merge:
- Branch:
lua-profile-yoi-api - Merge commit:
15dc176e merge: lua profile yoi api
確認:
- Branch-local reviewer
reviewer-lua-profile-yoi-apiが approve。 cargo fmt --checkpassed。git diff --checkpassed。cargo test -p manifest profile --libpassed(22 passed)。cargo check -p manifestpassed。target/debug/yoi ticket doctorpassed。- typed
TicketDoctorは 0 errors / 3 pre-existing diagnostics。 nix build .#yoipassed。
残作業:
- なし。import/extend は現時点では
builtin:default/defaultに限定しています。より広い user/project selector import が必要なら follow-up Ticket として扱えます。