santifer/career-ops · error

Update commit failed (files may be staged but not…

Error message

Update commit failed (files may be staged but not committed).
    Error: ${e.message.split('\n')[0]}
    Please run manually to finish the update:
    ${recovery}

What it means

The final step of `update-system.mjs apply` commits the staged system files (chore: auto-update system files to vX.Y.Z). If `git commit` fails while the changed paths are still staged (confirmed via git status), apply throws this error with a ready-to-copy recovery command that matches the strategy actually used: a plain commit after an index-wide stage, or a pathspec commit when paths were staged individually — the pathspec form preserves staged file modes, so suggesting the wrong one would quietly reintroduce the bug it recovers from.

Solutions

  1. Run the exact `git commit ...` command printed in the error — the files are already staged
  2. If the underlying error was missing identity: git config --global user.name 'Your Name' and user.email, then run the recovery commit
  3. If a hook rejected it, read the hook output and fix or consciously bypass with --no-verify before committing
  4. Verify afterwards with `git log -1` and `git status`

Example fix

git config --global user.name 'Your Name'
git config --global user.email 'you@example.com'
git commit -m "chore: auto-update system files to v1.9.0"
Defensive patterns

Strategy: validation

Validate before calling

import { execSync } from 'child_process';
const hasIdentity = (() => { try { execSync('git config user.email', { stdio: 'pipe' }); return true; } catch { return false; } })();
if (!hasIdentity) throw new Error('configure git user.name and user.email before running the updater');

Prevention

When it happens

Trigger: No git identity configured (user.name/user.email unset, git aborts with 'Please tell me who you are'); a pre-commit hook (husky, pre-commit framework) rejecting the auto-commit; index.lock held by a concurrent git process; detached HEAD or read-only .git.

Common situations: Fresh machines and CI runners that never ran git config; hook managers intercepting maintenance commits; users who never let tooling commit.

Related errors


AI-assisted analysis of santifer/career-ops@e7abd431fc (2026-08-20). Data as JSON: /api/errors/83e98e91c9ce37ee. Report an issue: GitHub.

Appendix: source

Thrown at update-system.mjs:2197

            CAREER_OPS_UPDATE_REEXEC_TOKEN: marker.token,
            // Compatibility for target updaters before the authenticated
            // marker was introduced; only the authenticated child receives it.
            CAREER_OPS_UPDATE_REEXEC: '1',
            CAREER_OPS_UPDATE_BACKUP_BRANCH: backupBranch,
            ...(updateForce ? { CAREER_OPS_UPDATE_FORCE: '1' } : {}),
            // Keep the legacy confirmation channel for older target updaters;
            // this process still requires the authenticated marker above.
            CAREER_OPS_UPDATE_CONFIRM: '1',
          },
        });
        return;
      } catch (err) {
        if (isTimeoutLikeError(err)) {
          console.error(`Updater self-reexec timed out after ${timeoutSeconds(timeout)}s.`);
          throw err;
        }
        console.error(`Updater self-reexec failed: ${err.message}`);
        throw err;
      }
    }

    // 3. Checkout system files only
    console.log('Updating system files...');
    const updated = [];
    let remoteSystemPaths = [];
    try {
      const remoteUpdaterSource = git('show', 'FETCH_HEAD:update-system.mjs');
      remoteSystemPaths = extractArrayFromSource(remoteUpdaterSource, 'SYSTEM_PATHS');
    } catch {
      // Older targets may not have update-system.mjs. Fall back to the
      // local manifest plus bootstrap paths below.
    }

    // 3a. Keep bootstrap paths as a fallback for very old targets, but the
    // target updater's SYSTEM_PATHS is now the source of truth for new files.
    const updatePaths = mergePathLists(SYSTEM_PATHS, remoteSystemPaths, BOOTSTRAP_PATHS);

View on GitHub (pinned to e7abd431fc)