Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5716ea546 |
@@ -0,0 +1,111 @@
|
|||||||
|
# AGENTS.md — Launcher Next
|
||||||
|
|
||||||
|
## Назначение
|
||||||
|
|
||||||
|
Launcher Next — отдельная программа для доставки, activation, запуска и
|
||||||
|
rollback корпоративных Plant 3D 2026 plugin packages. Она заменяет legacy
|
||||||
|
цепочку `launcher → P_Serv_Starter → BAT → LISP → OrthoLoader → 20 NETLOAD`:
|
||||||
|
|
||||||
|
`Launcher Next → manifest → local staging → SHA-256 validation → versioned activation → one startup NETLOAD → Plant 3D 2026 → entry assembly → wait → automatic rollback`.
|
||||||
|
|
||||||
|
Репозиторий `C:\dev\launcher-next` независим. Legacy launcher repositories
|
||||||
|
используются только read-only.
|
||||||
|
|
||||||
|
## Приложение и режимы
|
||||||
|
|
||||||
|
Существует одна видимая программа: `Launcher.Next.App`. Не создавать отдельные
|
||||||
|
test/pilot launchers с отдельным composition root; Pilot CLI — режим того же
|
||||||
|
приложения.
|
||||||
|
|
||||||
|
Launcher modes: `Legacy`, `DryRun`, `NextPilot`, `NextPreferred`. Допустимые
|
||||||
|
plugin modes: `Smoke`, `DryRun`; Apply требует отдельного задания. Без explicit
|
||||||
|
pilot configuration безопасные defaults: `DryRun`, `PilotEnabled=false`,
|
||||||
|
`AllowProcessStart=false`. Pilot CLI читает реальную local configuration, а не
|
||||||
|
создаёт safe-default вместо отсутствующего файла.
|
||||||
|
|
||||||
|
На test machine реальный Process.Start разрешён, если задача требует runtime
|
||||||
|
проверку и safety gates выполнены. Не ставить лишний review barrier после
|
||||||
|
foundation/interface/composition root/Prepare: задача real pilot должна дойти
|
||||||
|
до Execute, process, checkpoint, ProcessExited, automatic rollback,
|
||||||
|
`RolledBack`, documentation и push.
|
||||||
|
|
||||||
|
## Plant 3D launch contract
|
||||||
|
|
||||||
|
Подтверждённый Plant 3D 2026 contract:
|
||||||
|
|
||||||
|
```text
|
||||||
|
/product PLNT3D /language ru-RU /b <generated-startup-script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Не передавать `/p`, пока profile не доказан отдельным runtime evidence. Всегда
|
||||||
|
использовать `ProcessStartInfo.ArgumentList`. Передавать
|
||||||
|
`P_REC_ANNOT_RUNTIME_MODE=Smoke` или `DryRun` из pilot configuration.
|
||||||
|
|
||||||
|
## Pilot root, manifest и package
|
||||||
|
|
||||||
|
Разрешённый isolated root: `C:\AutoCAD User Support\LauncherNextPilot`. Он не
|
||||||
|
смешивается с `C:\AutoCAD User Support\Applications`. Запрещены UNC/relative
|
||||||
|
roots, Program Files, Autodesk ApplicationPlugins, repository directory, path
|
||||||
|
traversal, symlink/junction escape и writes в legacy root.
|
||||||
|
|
||||||
|
Manifest содержит schema, package ID/version, product/year/series,
|
||||||
|
architecture, entry assembly, rollout channel, rollback safety, relative files,
|
||||||
|
length и SHA-256. Блокировать Autodesk DLL, PDB, test/legacy assemblies,
|
||||||
|
absolute/path-traversal paths, missing entry assembly, changed files и hash
|
||||||
|
mismatch.
|
||||||
|
|
||||||
|
## Prepare, Execute и startup script
|
||||||
|
|
||||||
|
`PrepareAsync` читает configuration, discovers product, validates manifest and
|
||||||
|
source, creates deterministic LaunchPlan/script content/process specification и
|
||||||
|
не создаёт activation state/script/process.
|
||||||
|
|
||||||
|
`ExecuteAsync` повторно проверяет gate и one-time permit, сохраняет
|
||||||
|
ActivationSnapshot, использует unique staging, повторно проверяет hashes,
|
||||||
|
атомарно activates version/pointers, materializes script, повторно проверяет
|
||||||
|
process state, запускает один process и сохраняет PID/session. Не подменять
|
||||||
|
service ручным PowerShell copying.
|
||||||
|
|
||||||
|
Startup script содержит ровно один `_.NETLOAD` только entry assembly из
|
||||||
|
versioned local directory; он не запускает commands/LISP/OrthoLoader, не меняет
|
||||||
|
TRUSTEDPATHS, не ссылается на UNC и не NETLOAD internal dependencies.
|
||||||
|
|
||||||
|
## Session и rollback
|
||||||
|
|
||||||
|
States: `Prepared`, `Activating`, `Activated`, `ProcessStarting`,
|
||||||
|
`ProcessStarted`, `WaitingForRuntimeCheck`, `ProcessExited`, `RollbackStarted`,
|
||||||
|
`RolledBack`, `Failed`. Session atomically persisted; permit token никогда не
|
||||||
|
пишется. Active/incomplete session блокирует второй run.
|
||||||
|
|
||||||
|
Automatic rollback выполняется после завершения конкретного PID. Он читает
|
||||||
|
persisted session/snapshot, восстанавливает exact current/previous pointers,
|
||||||
|
удаляет startup script и pilot version, очищает staging, идемпотентен и работает
|
||||||
|
после перезапуска. Проверять фактические файлы, не только сообщение.
|
||||||
|
|
||||||
|
CLI: `pilot prepare`, `pilot run`, `pilot status`, `pilot rollback`.
|
||||||
|
`pilot run --wait-for-exit --rollback-after-exit` не завершается сразу после
|
||||||
|
Process.Start — он ждёт AutoCAD и rollback.
|
||||||
|
|
||||||
|
## Legacy isolation, documentation и tests
|
||||||
|
|
||||||
|
Launcher Next не изменяет legacy launcher/P_Serv_Starter/BAT/LISP/
|
||||||
|
app_netload.lsp/OrthoLoader/Settings.xml, AutoCAD profile, registry или
|
||||||
|
TRUSTEDPATHS. Допустима read-only hash verification.
|
||||||
|
|
||||||
|
Документировать цепочку `CLI → configuration → manifest → validation → Prepare
|
||||||
|
→ permit → snapshot → staging → activation/pointers → script → Process.Start →
|
||||||
|
PID → NETLOAD → plugin → wait → ProcessExited → rollback → RolledBack` с
|
||||||
|
реальными классами/методами.
|
||||||
|
|
||||||
|
Tests не запускают AutoCAD; process invoker заменяется fake. Обязательны parser,
|
||||||
|
gates, manifest/hash, staging/atomic activation, permit, arguments, persistence,
|
||||||
|
wait, automatic/standalone/idempotent rollback и legacy isolation. Реальный
|
||||||
|
Plant runtime фиксируется отдельным evidence.
|
||||||
|
|
||||||
|
## Definition of Done
|
||||||
|
|
||||||
|
Launcher slice завершён, когда normal UI сохранён, CLI вызывает реальный
|
||||||
|
application service, build без warnings, tests passed, требуемый runtime pilot
|
||||||
|
выполнен, assembly loaded from versioned directory, PID закрыт штатно, rollback
|
||||||
|
и `RolledBack` проверены, механика документирована, ветка published обычным
|
||||||
|
push.
|
||||||
Reference in New Issue
Block a user