fix: submit the confirmed project work source directory

This commit is contained in:
鲨鱼辣椒 committed 2026-10-14 14:25:44 +08:00
1 parent f34e651774
commit 0d6ac413dc
8 files changed
+433 -28

No files matched your search

@@ -0,0 +1,68 @@
# Task: Use confirmed work engineering directory for release submission
## Identity
- Task ID: 20261014-release-source-directory-3ccabc06
- Mode: Feature
- Branch: codex/20261014-release-source-directory-3ccabc06-release-source-directory
- Worktree: /Users/chillishark/Makelore 麦洛/.codex-worktrees/makelore/20261014-release-source-directory-3ccabc06
- Base commit: f34e651774beb6a2a213b5711f2ffb887d22d4b7
- Owner: codex
- Status: Ready for Integration
## Scope
- Repair existing work submission source selection by reusing the validated saved work directory and constrained work discovery used by opening. Preserve registered project metadata/history identity and release validation; add focused regression coverage and accurate failure guidance.
## Intent And Constraints
- User explicitly requested repair after read-only diagnosis. Do not move/rewrite the user's game or metadata, create conversations, call a model, submit to the real service, restart/update the current trial, merge/push, or clean other worktrees as part of this source repair.
- Keep registered root configuration, project id, submission binding and build concurrency identity unchanged; distinguish source root from project root. Saved launch is a directory clue, not publish readiness. Keep existing root Vite projects publishable without requiring dev scripts.
## Project Context Loaded
Task context:
- Official start/status verified feature task id, branch, absolute worktree and base f34e651774beb6a2a213b5711f2ffb887d22d4b7 (latest fetched origin/main). Primary checkout has unrelated dirty task documentation and is untouched.
- All74 peer scopes/222 required sections read/hash checked; no related semantic conflict. Work-entry and preview recovery require project-level identity, bounded unique discovery, no arbitrary command replay and no automatic model/conversation.
Read:
- Read-before-planning, memory-index, own record, planning-gate and AGENTS. Reused unchanged canonical context from the diagnosis on identical base f34e651; re-read positioning, decision/system/domain/evidence/reflection/commitment/stale indexes and relevant current-state sections, ADR008, project metadata and release/work-entry source.
Relevant understanding:
- Main owns project configuration and release packaging/build/preflight; project creation generates metadata/knowledge only and optional scaffold never overwrites existing code.
- The real alice project registers the outer root but has a verified saved Vite launch.directory for the inner engineering folder. Current opening already uses it; packager validates/scans only registered root.
- Directory selection must not change project id or cloud contracts and must retain workspace-to-source ancestry checks during packaging. Production publishing and installed-package verification are not implied by local tests.
- Files: work-entry-store/work-launcher, project-packager, release builder tests, publish failure projection and README. Existing dormant gallery pages are not restored; only the current project-config submit action is repaired.
Gate result: Passed.
## Plan
1. Select a source folder in the packager using the same trusted saved work-entry and bounded discovery helpers as opening; retain registered-root configuration and root-project compatibility.
2. Verify the whole registered-root-to-source directory chain throughout validation/scan/streamed reads; package only source-relative files.
3. Add nested-source, ambiguity, unchanged root, missing input and path-race regression tests; correct misleading template-damage guidance, run focused checks, build and independent review.
## Outcome
- Implemented source selection in the shared packager used by full and summary release builders, including utility builds. Reads project type/id from registered-root configuration, then prefers loadWorkEntry's validated launch.directory. With no saved directory, preserves existing root-package release behavior (including missing/complex dev scripts), otherwise uses opening's existing bounded unique discovery. No URL probe, startup, model, metadata write or new persisted schema.
- Only the selected source is validated/scanned/zipped with source-relative archive paths. Registered-root identity, release busy key, version naming and submission binding remain unchanged; an inner .makelore config cannot override the registered project.
- Retained and repeatedly checked the whole registered-root-to-source directory identity chain during validation, recursive scan and streamed reads. Invalid/copy/traversal/symlink entries cannot authorize outside content; configured private/generated source folders are rejected. An ambiguous discovery reports PROJECT_SOURCE_UNCONFIRMED rather than choosing a candidate.
- Kept mandatory package/lock/index, Vite declaration, source exclusions/limits, immutable build snapshot and browser preflight behavior. Missing inputs in a valid selected source do not fall back to another/root game.
- Corrected missing-file guidance to describe absent/unreadable publishing inputs without claiming template deletion/damage; added safe actionable directory-ambiguity guidance. Updated README and meaningful regressions. Independent review approved with no blocker.
## Verification
- Exact pinned pnpm10.33.4 used (initial global fallback version check found11.25.0; all verification commands explicitly used10.33.4). Dependency directory is an ignored link to existing installed primary dependencies; no dependency/lock changes or download committed.
- Standard typecheck, strict targeted Main module-closure tsc, scoped ESLint and Renderer/Main/Preload/release-utility production build all passed. Logs: /tmp/makelore-release-source-typecheck-3ccabc06.log, /tmp/makelore-release-source-main-types-3ccabc06.log, /tmp/makelore-release-source-lint-3ccabc06.log, /tmp/makelore-release-source-build-3ccabc06.log.
- 219 related unit tests passed: work-entry/launcher/preview/release-job/routes/scaffold156; packager22 and builder3; publish failure projection/component38. New full/summary builder checks inspect source archives and immutable build snapshots, with every fixture user file unchanged; builder test uses node environment for native ZIP behavior.
- Native Electron2/2 passed: saved work survives full restart and restarts a stopped service without new conversation/model; production local preflight isolates requests and cleans temporary renderers. Isolated fixture user-data/home used; running trial/account untouched. Log: /tmp/makelore-release-source-electron-3ccabc06.log; artifacts /tmp/makelore-release-source-electron-3ccabc06.
- Scoped tests include nested Unicode source, outer valid root as fallback trap, inner absent/custom config, no saved entry unique discovery, multiple candidates, unsafe/copied entries, missing selected lock and ancestor substitution between scan/stream. Test logs: /tmp/release-source-directory-tests-final-3ccabc06.log and /tmp/makelore-release-source-regression-3ccabc06.log.
- No real-project file changes, paid model, dependency installation into the user's game, real submit/upload, app update, merge/push or other-worktree cleanup. Tests use controlled build runtime and do not claim actual production npm/build/review success.
## Follow-ups
- Ready for integration and temporary-app delivery when requested. Current running trial still contains the previous packager. No actual user project or real cloud submission was exercised.
## Promotion Candidates
- Target: ADR008 and architecture data-flow/module-map. Proposal: distinguish registered project root (identity/config/history/binding) from project-contained engineering source, reusing validated work entry and constrained discovery for submission while keeping release-specific validation and root compatibility. Evidence: product packager change,219 units,2 Electron cases and independent review. Future impact: prevent later opening/publishing features from reintroducing the root mismatch or using preview as release readiness proof. Semantic conflicts: none found in74 peer scopes; no cloud contract or metadata migration. Human confirmation: current repair direction explicitly authorized; canonical promotion still requires a serialized Integration task.