Repository navigation
Description
Problem
LastCode actions are declared in t3.json, but runnable Project Actions are stored separately in each environment's project state. Refreshing a managed canonical checkout makes a new action appear under From t3.json, but does not make it runnable or resumable in new threads.
This left a managed environment without Build Intel package (macOS) even though the action was checked in. New threads already inherit actions saved for their environment; the missing piece is a LastCode-only reconciliation step in each explicitly managed environment.
Scope
Add a LastCode workflow helper that reconciles Project Actions for the explicitly managed LastCode project after setup and after a successful managed-anchor refresh.
- Run only for a checkout explicitly marked as the managed LastCode anchor, after verifying repository identity.
- Read the current
t3.jsonand reconcile non-setup actions into that environment's saved project scripts. - Use deterministic action IDs and adopt an existing exact legacy import rather than creating a duplicate.
- Track which entries the helper owns in environment-local LastCode state.
- Add missing actions and update their managed fields when
t3.jsonchanges. - Preserve local-only fields, especially keybindings and
allowAgentResume. - Remove a no-longer-declared action only when it is recorded as managed and still matches the last managed specification; otherwise retain it and report the divergence.
- Apply updates through the event-sourced project command path. Never write
state.sqlitedirectly. - Invoke reconciliation during
lastcode-setupand after managed-anchor refresh.
Out of scope: automatic imports for arbitrary T3 repositories or changes to generic T3 Project Action behavior.
Security boundary
A checked-in command is not permission for an agent to execute it. Newly discovered actions default to allowAgentResume: false. Reconciliation preserves the environment's existing value and never enables it merely because an action appears in t3.json or matches a known name.
An explicit environment-local trust allowlist may grant resume permission to stable LastCode action IDs after a deliberate setup/configuration choice. Removing trust disables the managed grant without deleting the action.
Acceptance criteria
- Fresh LastCode setup saves
Wait for PR,Build Intel package (macOS), andRun Full CIas Project Actions;Setup Worktreeis not duplicated as a normal action. - Adding a non-setup action to
t3.json, then refreshing the managed anchor, installs it once in every configured managed environment without manual import. - Reconciliation is idempotent and creates no duplicates.
- Managed name, command, and icon changes propagate while local keybindings and resume permission survive.
- User-created or locally diverged actions are not silently overwritten or deleted.
- New actions cannot be launched by an agent until locally trusted.
- Live and stopped-server paths have focused coverage, including repository/anchor guards and error reporting.
- LastCode operations docs distinguish automatic availability from local execution trust.
Likely implementation
- A focused
scripts/lastcode-project-actions.*helper and tests. - Integration in
scripts/lastcode-setup.mjsand the checkpoint supervisor's post-refresh hook. - Minimal server CLI plumbing if needed to perform event-sourced project updates safely.
- LastCode setup and operations documentation.
Activity
feat(lastcode): reconcile managed project actions (#174)
feat(lastcode): reconcile managed project actions (#174)
feat(lastcode): reconcile managed project actions (#174)
feat(lastcode): reconcile managed project actions (#174)
feat(lastcode): reconcile managed project actions (#174)
feat(lastcode): reconcile managed project actions (#174)
feat(lastcode): reconcile managed project actions (#174)