robisie 0.5.39 → 0.5.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/engine/build-id.json +1 -1
- package/dist/engine/bundle-report.json +5 -5
- package/dist/engine/tick.cjs +123 -4
- package/dist/roles.d.ts +1 -1
- package/docs/README.en.md +1 -1
- package/docs/README.md +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Historia zmian klienta / Client changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.40](https://github.com/chuppa12/robisie-app/compare/client-v0.5.39...client-v0.5.40) (2026-11-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Factory Cards
|
|
7
|
+
|
|
8
|
+
* praca workera task-mwhrg8jd-umbq0d (auto-commit) ([ce1df32](https://github.com/chuppa12/robisie-app/commit/ce1df32cedebebada287bca0a4ec3bba70eafef0))
|
|
9
|
+
|
|
3
10
|
## [0.5.39](https://github.com/chuppa12/robisie-app/compare/client-v0.5.38...client-v0.5.39) (2026-11-15)
|
|
4
11
|
|
|
5
12
|
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Package identity and the server contract it speaks. */
|
|
2
2
|
export declare const PACKAGE_NAME = "robisie";
|
|
3
|
-
export declare const PACKAGE_VERSION = "0.5.
|
|
3
|
+
export declare const PACKAGE_VERSION = "0.5.40";
|
|
4
4
|
/**
|
|
5
5
|
* MAJOR of the agent-API contract this package understands.
|
|
6
6
|
* PARITY: src/lib/mcp/contract-version.ts (AGENT_API_CONTRACT_VERSION) on the server.
|
package/dist/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Package identity and the server contract it speaks. */
|
|
2
2
|
export const PACKAGE_NAME = "robisie";
|
|
3
|
-
export const PACKAGE_VERSION = "0.5.
|
|
3
|
+
export const PACKAGE_VERSION = "0.5.40"; // x-release-please-version
|
|
4
4
|
/**
|
|
5
5
|
* MAJOR of the agent-API contract this package understands.
|
|
6
6
|
* PARITY: src/lib/mcp/contract-version.ts (AGENT_API_CONTRACT_VERSION) on the server.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schema":1,"sha":"
|
|
1
|
+
{"schema":1,"sha":"ab77f3f7094c91381c2be537874f910781bf1252","dirty":false}
|
|
@@ -1680,14 +1680,14 @@
|
|
|
1680
1680
|
"staticOperations": {
|
|
1681
1681
|
"beforePreflight": {
|
|
1682
1682
|
"module": "maszynista/tick.ts",
|
|
1683
|
-
"startLine":
|
|
1684
|
-
"endLine":
|
|
1683
|
+
"startLine": 10003,
|
|
1684
|
+
"endLine": 10116,
|
|
1685
1685
|
"text": "export async function main(): Promise<number> {\n const start = standaloneStartCheck({ filename: __filename, env: process.env });\n if (start.standalone && !start.ok) {\n console.error(start.message);\n process.exitCode = 78;\n return 78;\n }\n let installation: EngineContext;\n try { installation = createEngineContext(currentEngine(), {\n loadEnvironment: loadEnvFiles, preflight, baseRef: engineBaseRef, refreshBase: fetchMain,\n disk: defaultDiskPressureDependencies, workerContext: loadNorthStar,\n controlEnv: hostEnv, workerEnv: executionEnv, prepareWorktree: prepareHostWorktree, workerArtifacts: createWorkerTmpdir,\n notify: async (card, reason) => { decisionForReksio(card, reason, \"Rozstrzygnij na karcie\", \"\", \"\"); return { outcome: \"recorded\", ref: DECISIONS_REKSIO }; },\n hostOperations: hostOperationsPhase,\n activation: { confirmLoaded, finishHostActivation, readActivationState, recoverTickTimeout, runEnabledAuto },\n }, git, log); }\n catch (error) {\n if (!engineClient()) throw error;\n console.error(`HOLD kontekst klienta: ${clientTickFailure(error)}`);\n process.exitCode = 78;\n return 78;\n }\n const previousInstallation = tickInstallation;\n const hostErrorText = errorText;\n const client = engineClient();\n const result: { outcome: \"ok\" | \"retry\" | \"stop\"; reason: string; cleanup: boolean } = { outcome: \"ok\", reason: \"\", cleanup: false };\n const stopClient = (reason = clientTickFailure()): void => {\n if (client && result.outcome !== \"stop\") { result.outcome = \"stop\"; result.reason = reason; }\n };\n let code = 2;\n try { code = await q.withPlannerQueries(installation.planner, async () => {\n tickInstallation = installation;\n const seedGateSettings = installationSeedGateSettings();\n const errorText = client ? clientTickFailure : hostErrorText;\n const loadEnvFiles = installation.loadEnvironment;\n const preflight = () => {\n const actor = installation.preflight();\n return { uid: actor.kind === \"db\" ? actor.uid : API_ACTOR };\n };\n const { confirmLoaded, finishHostActivation, readActivationState, recoverTickTimeout, runEnabledAuto } = installation.activation;\n const smokeOnly = DRY && process.env.MASZYNISTA_SMOKE === \"1\";\n if (!DRY) {\n const acquire = (): boolean => tryCreateTickLock(LOCK);\n if (!acquire()) {\n const raw = readFileSync(LOCK, \"utf8\"), pid = Number(raw);\n if (!Number.isSafeInteger(pid) || pid <= 0) { console.log(\"tick lock bez poprawnego PID — HOLD\"); return 0; }\n try { process.kill(pid, 0); console.log(`tick już trwa (pid ${pid})`); return 0; }\n catch (error) { if ((error as NodeJS.ErrnoException).code !== \"ESRCH\") throw error; }\n if (readFileSync(LOCK, \"utf8\") === raw) unlinkSync(LOCK);\n if (!acquire()) { console.log(\"tick już trwa\"); return 0; }\n }\n }\n skippedCardEvents.clear();\n let s = parseState(null).state;\n // Internal smoke handoff: the child cannot outlive the parent's reserved budget.\n const smokeLimit = DRY ? Number(process.env.MASZYNISTA_SMOKE_TIMEOUT_MS) : NaN;\n let stateLoaded = false;\n let tickStarted: string | undefined;\n let outcome: \"ok\" | \"failed\" = \"ok\";\n let runtimeFailed = false;\n let observedLoaded = \"UNKNOWN\";\n let tickPhase = \"startup\";\n const deadlineAlarm = armTickDeadline(() => s, Number.isSafeInteger(smokeLimit) && smokeLimit > 0\n ? Math.min(TICK_LIMIT_MS, smokeLimit) : TICK_LIMIT_MS, () => ({ phase: tickPhase, observedLoaded }));\n let hostReady = false;\n let hostBoard: { uid: string; projectId: string } | undefined;\n let activationCards: CardLike[] = [];\n let activationCardsKnown = false;\n let blockedBefore = 0;\n const clientStopped = (): boolean => {\n if (client && (outcome === \"failed\" || (!DRY && s.blocked > blockedBefore))) stopClient();\n if (client && result.outcome === \"stop\") outcome = \"failed\";\n return client && result.outcome === \"stop\";\n };\n let hostPhaseStarted = false;\n const hostPhase = async (): Promise<boolean> => {\n if (smokeOnly || !hostReady || hostPhaseStarted) return false;\n hostPhaseStarted = true;\n tickPhase = \"host\";\n if (hostBoard) {\n const { uid: boardUid, projectId: boardProject } = hostBoard;\n try {\n await runEnabledAuto({ state: s, loadedSha: observedLoaded, repo: REPO, logPath: LOG, tick: s.tick, stateDir: hostStateDir(),\n now: new Date().toISOString(), activation: readActivationState(hostStateDir()), dryRun: DRY }, {\n listCards: async () => scanTasks(boardUid, boardProject, { full: true, statuses: [\"delivered\"],\n detailsKeys: ENABLED_SCAN_DETAILS_KEYS }),\n getTask: id => q.getTask(boardUid, id),\n appendDetail: async (id, patch) => { await appendBoundedDetail(boardUid, id, patch); },\n saveState: writeState,\n alarm: hostActivationAlarm,\n log,\n });\n } catch (error) { runtimeFailed = true; outcome = \"failed\"; log(`FAIL ENABLED auto: ${errorText(error)}`); }\n } else log(\"ENABLED auto: UNKNOWN — brak odczytu projektu; dowód karty czeka na dostęp do tablicy\");\n try {\n const result = await engineRunHostActivation({ repo: REPO, stateDir: hostStateDir(), cards: activationCards, cardsKnown: activationCardsKnown, tick: s.tick, dryRun: DRY }, {\n git, remainingTickMs, alarm: hostActivationAlarm, infrastructureChecks, infrastructurePullRequest, log: line => log(`host-activation: ${line}`),\n });\n log(`host-activation: code=${result.code} target=${result.target ?? \"UNKNOWN\"}${result.detail ? ` reason=${result.detail}` : \"\"}`);\n if (result.code === \"activate\" && result.target) {\n lastTick(s, \"activation\", `aktywacja ${result.target}; ogon odroczony`, outcome === \"ok\");\n return true;\n }\n } catch (error) { runtimeFailed = true; outcome = \"failed\"; log(`FAIL aktywacja: ${errorText(error)}`); }\n return false;\n };\n try {\n observedLoaded = loadedSha = readLoadedSha(REPO);\n s = readState((await engineFjConfig()).enabled);\n stateLoaded = true; blockedBefore = s.blocked;\n s.tick++; tickStarted = new Date().toISOString(); s.lastTickAt = tickStarted;\n log(`tick_started tick=${s.tick} at=${tickStarted} duration=UNKNOWN loaded=${loadedSha}`);\n loadEnvFiles();\n const { uid } = preflight();"
|
|
1686
1686
|
},
|
|
1687
1687
|
"finalization": {
|
|
1688
1688
|
"module": "maszynista/tick.ts",
|
|
1689
|
-
"startLine":
|
|
1690
|
-
"endLine":
|
|
1689
|
+
"startLine": 10407,
|
|
1690
|
+
"endLine": 10459,
|
|
1691
1691
|
"text": " } finally {\n // A persisted terminal FAIL is a card result; every unexpected exception above\n // remains a runtime failure, including DB errors inside card handling.\n if (!DRY && s.blocked > blockedBefore) {\n outcome = \"failed\";\n try { log(`FAIL: licznik blocked wzrósł ${blockedBefore} → ${s.blocked}; outcome=failed`); }\n catch (error) { console.error(`zapis licznika blocked: ${errorText(error)}`); }\n }\n clientStopped();\n // Early board failure still reaches the same host phase, at most once per tick.\n await hostPhase();\n tickPhase = \"finalizing\";\n try { if (!DRY) await finishHostActivation({ stateDir: hostStateDir(), outcome, tick: s.tick, runtimeFailed, observedLoaded }, { alarm: hostActivationAlarm, log }); }\n catch (error) { runtimeFailed = true; outcome = \"failed\"; log(`FAIL breaker aktywacji: ${errorText(error)}`); }\n clientStopped();\n try { if (stateLoaded) writeState(s); }\n catch (error) { runtimeFailed = true; outcome = \"failed\"; if (!client) throw error; stopClient(); result.cleanup = true; }\n finally {\n if (!DRY) {\n try { if (readFileSync(LOCK, \"utf8\") === String(process.pid)) unlinkSync(LOCK); }\n catch (error) { if ((error as NodeJS.ErrnoException).code !== \"ENOENT\") { if (!client) throw error; stopClient(); result.cleanup = true; } }\n }\n const at = new Date().toISOString();\n const duration = tickStarted ? `${(Date.parse(at) - Date.parse(tickStarted)) / 1000}s` : \"UNKNOWN\";\n try {\n const { total, ops } = drainEgressCounters();\n const sorted = Object.entries(ops).sort(([, a], [, b]) => b.bytes - a.bytes);\n const summary = sorted.filter(([op]) => !op.includes(\":\")).slice(0, 12)\n .map(([op, counter]) => `${op}:${counter.calls}:${counter.bytes}`).join(\",\");\n const variants = sorted.filter(([op]) => op.includes(\":\")).slice(0, 6)\n .map(([op, counter]) => `${op}:${counter.calls}:${counter.bytes}`).join(\",\");\n log(`egress tick=${s.tick} total=${total} ops=${summary} variants=${variants}`);\n } catch { /* Optional metrics must never interrupt tick cleanup. */ }\n try { refreshTickReport(observedLoaded); log(`tick_finished tick=${s.tick} at=${at} outcome=${client && result.outcome === \"retry\" ? \"retry\" : outcome} duration=${duration} loaded=${loadedSha}`); }\n finally { clearTimeout(deadlineAlarm); tickDeadline = Number.POSITIVE_INFINITY; }\n }\n }\n }); } catch (error) {\n if (!client) throw error;\n stopClient(); result.cleanup = true;\n } finally {\n tickInstallation = previousInstallation;\n try { await installation.close(); }\n catch (error) {\n if (client) { stopClient(); result.cleanup = true; }\n else safeLog(`Zamknięcie instalacji nieudane: ${String(error)}`);\n }\n }\n if (client && result.outcome !== \"ok\") console.error(`Fabryka ${result.outcome === \"stop\" ? \"zatrzymana\" : \"retry\"}: ${result.reason}${result.cleanup ? \"; finalizacja niepotwierdzona — sprawdź stan i blokadę\" : \"\"}`);\n return client && result.outcome === \"stop\" ? 2 : code;\n}\n\nif (require.main === module && !([\"--opencode-runner\", \"--grok-runner\"].includes(process.argv[2] ?? \"\"))) {"
|
|
1692
1692
|
},
|
|
1693
1693
|
"refreshTickReport": {
|
|
@@ -1713,6 +1713,6 @@
|
|
|
1713
1713
|
"status": 0,
|
|
1714
1714
|
"signal": null,
|
|
1715
1715
|
"stdout": "v24.3.0\n",
|
|
1716
|
-
"stderr": "(node:
|
|
1716
|
+
"stderr": "(node:21025) ExperimentalWarning: SQLite is an experimental feature and might change at any time\n(Use `node --trace-warnings ...` to show where the warning was created)\n"
|
|
1717
1717
|
}
|
|
1718
1718
|
}
|
package/dist/engine/tick.cjs
CHANGED
|
@@ -37652,7 +37652,7 @@ var init_constants = __esm({
|
|
|
37652
37652
|
"packages/client/src/constants.ts"() {
|
|
37653
37653
|
"use strict";
|
|
37654
37654
|
PACKAGE_NAME = "robisie";
|
|
37655
|
-
PACKAGE_VERSION = "0.5.
|
|
37655
|
+
PACKAGE_VERSION = "0.5.40";
|
|
37656
37656
|
SUPPORTED_CONTRACT_MAJOR = 1;
|
|
37657
37657
|
DEFAULT_ORIGIN = "https://robisie.app";
|
|
37658
37658
|
MCP_SERVER_NAME = "robisie";
|
|
@@ -317384,6 +317384,66 @@ function git(args, cwd = TASK_REPO, timeoutMs = 6e4, createsCommit = false) {
|
|
|
317384
317384
|
});
|
|
317385
317385
|
return args.includes("-z") ? output : output.trim();
|
|
317386
317386
|
}
|
|
317387
|
+
function addedConflictMarkers(worktree, baseRef, tree) {
|
|
317388
|
+
const base2 = git(["merge-base", baseRef, "HEAD"], worktree);
|
|
317389
|
+
if (!git(["log", "--format=%s", `${base2}..HEAD`], worktree).split("\n").includes(CONFLICT_PREPARATION_SUBJECT)) return [];
|
|
317390
|
+
const target = tree === "HEAD" ? ["HEAD"] : [];
|
|
317391
|
+
const files2 = git(["diff", "--no-ext-diff", "--no-textconv", "--name-only", "-z", base2, ...target, "--"], worktree).split("\0").filter(Boolean);
|
|
317392
|
+
return files2.filter((file3) => git(["diff", "--no-ext-diff", "--no-textconv", "--unified=0", base2, ...target, "--", `:(literal)${file3}`], worktree).split("\n").some((line2) => line2.startsWith("+") && !line2.startsWith("+++") && /^(?:<{7}|>{7})(?: |$)/.test(line2.slice(1))));
|
|
317393
|
+
}
|
|
317394
|
+
function prepareConflictWorktree(worktree, branch, base2, candidate, snapshot2) {
|
|
317395
|
+
if (candidate.diff || candidate.staged) return null;
|
|
317396
|
+
const untracked = () => git(["ls-files", "--others", "-z"], worktree).split("\0").filter(Boolean).map((file3) => {
|
|
317397
|
+
const absolute2 = import_node_path52.default.join(worktree, file3);
|
|
317398
|
+
const stat = (0, import_node_fs47.lstatSync)(absolute2);
|
|
317399
|
+
if (!stat.isSymbolicLink() && !stat.isFile()) throw new Error(`nie\u015Bledzony plik UNKNOWN: ${file3}`);
|
|
317400
|
+
return [file3, stat.isSymbolicLink() ? "link:" + (0, import_node_fs47.readlinkSync)(absolute2) : "bytes:" + (0, import_node_fs47.readFileSync)(absolute2).toString("base64")];
|
|
317401
|
+
});
|
|
317402
|
+
const operations = ["MERGE_HEAD", "SQUASH_MSG", "CHERRY_PICK_HEAD", "REVERT_HEAD", "rebase-merge", "rebase-apply", "sequencer"];
|
|
317403
|
+
const operationPaths = operations.map((operation) => import_node_path52.default.resolve(worktree, git(["rev-parse", "--git-path", operation], worktree)));
|
|
317404
|
+
if (operationPaths.some((file3) => (0, import_node_fs47.existsSync)(file3))) return null;
|
|
317405
|
+
const before = untracked();
|
|
317406
|
+
const ref = `refs/robisie/konflikt/${branch}-${candidate.head.slice(0, 8)}`;
|
|
317407
|
+
const mutate = (args, commit = false) => git(["-c", "core.hooksPath=/dev/null", ...args], worktree, 12e4, commit);
|
|
317408
|
+
const rollback = () => {
|
|
317409
|
+
mutate(["checkout", "-f", "-B", branch, ref]);
|
|
317410
|
+
const squash = operationPaths[1];
|
|
317411
|
+
if ((0, import_node_fs47.existsSync)(squash)) (0, import_node_fs47.unlinkSync)(squash);
|
|
317412
|
+
if (!(0, import_node_util14.isDeepStrictEqual)(snapshot2(), candidate) || !(0, import_node_util14.isDeepStrictEqual)(untracked(), before) || git(["symbolic-ref", "--short", "HEAD"], worktree) !== branch || git(["diff", "--name-only", "--diff-filter=U", "-z"], worktree) || operationPaths.some((file3) => (0, import_node_fs47.existsSync)(file3))) throw new Error("rollback: kandydat lub pliki nie\u015Bledzone/operacja UNKNOWN");
|
|
317413
|
+
};
|
|
317414
|
+
let checkoutStarted = false;
|
|
317415
|
+
try {
|
|
317416
|
+
mutate(["update-ref", ref, candidate.head]);
|
|
317417
|
+
checkoutStarted = true;
|
|
317418
|
+
mutate(["checkout", "--no-overwrite-ignore", "-B", branch, base2]);
|
|
317419
|
+
let mergeError;
|
|
317420
|
+
try {
|
|
317421
|
+
mutate(["merge", "--squash", candidate.head]);
|
|
317422
|
+
} catch (error48) {
|
|
317423
|
+
mergeError = error48;
|
|
317424
|
+
}
|
|
317425
|
+
const files2 = git(["diff", "--name-only", "--diff-filter=U", "-z"], worktree).split("\0").filter(Boolean);
|
|
317426
|
+
if (!files2.length || mergeError && gitExitStatus(mergeError) !== 1) throw new Error(`squash bez potwierdzonego konfliktu: ${errorText5(mergeError)}`);
|
|
317427
|
+
for (const file3 of files2) {
|
|
317428
|
+
const contents = (0, import_node_fs47.readFileSync)(import_node_path52.default.join(worktree, file3), "utf8");
|
|
317429
|
+
if (!/^<{7}(?: |$)/m.test(contents) || !/^>{7}(?: |$)/m.test(contents)) throw new Error(`konflikt bez marker\xF3w: ${file3}`);
|
|
317430
|
+
}
|
|
317431
|
+
mutate(["add", "--", ...files2.map((file3) => `:(literal)${file3}`)]);
|
|
317432
|
+
mutate(["commit", "-m", CONFLICT_PREPARATION_SUBJECT], true);
|
|
317433
|
+
const head = git(["rev-parse", "--verify", "HEAD^{commit}"], worktree);
|
|
317434
|
+
if (!/^[a-f0-9]{40}$/.test(head) || git(["symbolic-ref", "--short", "HEAD"], worktree) !== branch || git(["rev-list", "--parents", "-n", "1", "HEAD"], worktree) !== `${head} ${base2}` || git(["rev-list", "--count", `${base2}..HEAD`], worktree) !== "1" || git(["rev-parse", "--verify", ref], worktree) !== candidate.head || git(["diff", "--name-only", "--diff-filter=U", "-z"], worktree) || snapshot2().diff || snapshot2().staged || !(0, import_node_util14.isDeepStrictEqual)(untracked(), before) || operationPaths.some((file3) => (0, import_node_fs47.existsSync)(file3))) throw new Error("kontrola przygotowania konfliktu UNKNOWN");
|
|
317435
|
+
return { ref, head, files: files2, rollback };
|
|
317436
|
+
} catch (error48) {
|
|
317437
|
+
try {
|
|
317438
|
+
if (checkoutStarted) rollback();
|
|
317439
|
+
else if (!(0, import_node_util14.isDeepStrictEqual)(snapshot2(), candidate) || !(0, import_node_util14.isDeepStrictEqual)(untracked(), before)) throw new Error("odmowa refa: kandydat UNKNOWN");
|
|
317440
|
+
} catch (rollbackError) {
|
|
317441
|
+
throw new DispatchHold(`HOLD konflikt: ${errorText5(error48)}; rollback: ${errorText5(rollbackError)}`, false);
|
|
317442
|
+
}
|
|
317443
|
+
log2(`konflikt: odmowa przygotowania, kandydat zachowany: ${errorText5(error48)}`);
|
|
317444
|
+
return null;
|
|
317445
|
+
}
|
|
317446
|
+
}
|
|
317387
317447
|
function autoCommitWorker(a) {
|
|
317388
317448
|
if (!git(["status", "--porcelain", "--", ".", REVIEW_JOB_EXCLUDE], a.worktree)) return;
|
|
317389
317449
|
git(["add", "-A", "--", ".", REVIEW_JOB_EXCLUDE], a.worktree);
|
|
@@ -321803,6 +321863,16 @@ async function reviewActive(s, uid, card, a, landing, installation = tickInstall
|
|
|
321803
321863
|
await fetchMain(a.worktree, installation);
|
|
321804
321864
|
} else await fetchMain(a.worktree);
|
|
321805
321865
|
autoCommitWorker(a);
|
|
321866
|
+
let markers2 = [];
|
|
321867
|
+
try {
|
|
321868
|
+
markers2 = addedConflictMarkers(a.worktree, installation?.baseRef() ?? engineBaseRef(), "HEAD");
|
|
321869
|
+
} catch (error48) {
|
|
321870
|
+
log2(`review ${card.id}: odczyt marker\xF3w: ${errorText5(error48)}`);
|
|
321871
|
+
}
|
|
321872
|
+
if (markers2.length) {
|
|
321873
|
+
await holdReviewJob(s, uid, card, `pozosta\u0142e markery konfliktu: ${markers2.join(", ")}`);
|
|
321874
|
+
return;
|
|
321875
|
+
}
|
|
321806
321876
|
const ahead = git(["rev-list", "--count", `${engineBaseRef()}..HEAD`], a.worktree);
|
|
321807
321877
|
if (!/^\d+$/.test(ahead)) throw new Error("Nie mo\u017Cna policzy\u0107 commit\xF3w workera");
|
|
321808
321878
|
if (Number(ahead) === 0) {
|
|
@@ -322570,6 +322640,18 @@ async function consumeActive(s, uid, a = s.actives[0], landing = { available: tr
|
|
|
322570
322640
|
} catch (error48) {
|
|
322571
322641
|
log2(`worker report ${card.id}: odczyt HEAD: ${errorText5(error48)}`);
|
|
322572
322642
|
}
|
|
322643
|
+
if (outcome.status === "WORKER_FINISHED" || outcome.status === "ALREADY_DONE") {
|
|
322644
|
+
try {
|
|
322645
|
+
const markers2 = addedConflictMarkers(a.worktree, installation?.baseRef() ?? engineBaseRef(), "HEAD");
|
|
322646
|
+
if (markers2.length) {
|
|
322647
|
+
const reason = `Pozosta\u0142e markery konfliktu: ${markers2.join(", ")}`;
|
|
322648
|
+
log2(`worker report ${card.id}: FAILED ${reason}`);
|
|
322649
|
+
outcome = { status: "FAILED", report: reason };
|
|
322650
|
+
}
|
|
322651
|
+
} catch (error48) {
|
|
322652
|
+
log2(`worker report ${card.id}: odczyt marker\xF3w: ${errorText5(error48)}`);
|
|
322653
|
+
}
|
|
322654
|
+
}
|
|
322573
322655
|
let workerReportReceipt = null;
|
|
322574
322656
|
if (output && (!openCodeJob || openCodeResult?.status === "completed")) {
|
|
322575
322657
|
try {
|
|
@@ -324495,6 +324577,7 @@ async function dispatchCard(s, uid, projectId2, c, selection, installation, clie
|
|
|
324495
324577
|
let unchangedInputHold = false;
|
|
324496
324578
|
let recreatedPreparing = false;
|
|
324497
324579
|
let rebaseConflict = "";
|
|
324580
|
+
let dispatchMarkers;
|
|
324498
324581
|
let finalAdmissionSnapshot;
|
|
324499
324582
|
let stamp2;
|
|
324500
324583
|
const previousStreak = asRecord3(reserved2.details?.maszynista).dispatch_failure_streak;
|
|
@@ -324546,6 +324629,8 @@ async function dispatchCard(s, uid, projectId2, c, selection, installation, clie
|
|
|
324546
324629
|
}
|
|
324547
324630
|
if (!worktreeMissing || recreated) {
|
|
324548
324631
|
let preparedBase;
|
|
324632
|
+
let preparedConflict = null;
|
|
324633
|
+
const previousBase = c.details?.base_sha;
|
|
324549
324634
|
if (recreated) {
|
|
324550
324635
|
try {
|
|
324551
324636
|
preparedBase = git(["rev-parse", "--verify", `${installation?.baseRef() ?? engineBaseRef()}^{commit}`], TASK_REPO);
|
|
@@ -324593,19 +324678,52 @@ async function dispatchCard(s, uid, projectId2, c, selection, installation, clie
|
|
|
324593
324678
|
## Potwierdzony konflikt R${reviewRound}
|
|
324594
324679
|
Rebase zosta\u0142 przerwany przez udany abort; HEAD, diff i indeks s\u0105 zachowane. Pliki konfliktu: ${conflictFiles.replace(/\n/g, ", ")}. Zachowaj t\u0119 ga\u0142\u0105\u017A i WIP. Rozwi\u0105\u017C konflikt z ${installation?.baseRef() ?? engineBaseRef()} zgodnie z zasadami pracy briefu; je\u015Bli wymaga zmiany pliku produkcyjnego poza zakresem lub decyzji, zachowaj prac\u0119 i zg\u0142o\u015B ACTIONABLE_BLOCKER z PYTANIE: do CR przez istniej\u0105cy raport terminalny. Nie zaczynaj od \u015Bwie\u017Cej bazy i nie wykonuj reset --hard.
|
|
324595
324680
|
`;
|
|
324681
|
+
try {
|
|
324682
|
+
const base2 = preparedBase ?? git(["rev-parse", "--verify", `${installation?.baseRef() ?? engineBaseRef()}^{commit}`], TASK_REPO);
|
|
324683
|
+
if (!/^[a-f0-9]{40}$/.test(base2)) throw new Error("\u015Bwie\u017Ca baza UNKNOWN");
|
|
324684
|
+
preparedConflict = prepareConflictWorktree(worktree, branch, base2, candidate, snapshot2);
|
|
324685
|
+
if (preparedConflict) {
|
|
324686
|
+
preparedBase = base2;
|
|
324687
|
+
log2(`konflikt karta=${c.id} stary=${candidate.head} nowy=${preparedConflict.head} ref=${preparedConflict.ref} pliki=${preparedConflict.files.join(", ")}`);
|
|
324688
|
+
}
|
|
324689
|
+
} catch (error48) {
|
|
324690
|
+
throw new DispatchHold(`HOLD repair R${reviewRound}: przygotowanie konfliktu: ${errorText5(error48)}`, false);
|
|
324691
|
+
}
|
|
324596
324692
|
}
|
|
324597
324693
|
try {
|
|
324598
|
-
if (preparedBase && !rebaseConflict) {
|
|
324694
|
+
if (preparedBase && (!rebaseConflict || preparedConflict)) {
|
|
324599
324695
|
snapshot2();
|
|
324600
324696
|
git(["merge-base", "--is-ancestor", preparedBase, "HEAD"], worktree);
|
|
324601
324697
|
}
|
|
324602
324698
|
sparseDirectories = configureSparseCheckout(worktree, c.details?.scope);
|
|
324603
|
-
if (
|
|
324699
|
+
if (preparedConflict) dispatchMarkers = addedConflictMarkers(worktree, installation?.baseRef() ?? engineBaseRef(), "working");
|
|
324700
|
+
if (preparedBase && (!rebaseConflict || preparedConflict)) await stampDispatchBase(uid, c, branch, preparedBase, false, installation);
|
|
324604
324701
|
} catch (error48) {
|
|
324702
|
+
if (preparedConflict) {
|
|
324703
|
+
try {
|
|
324704
|
+
preparedConflict.rollback();
|
|
324705
|
+
await appendBoundedDetail(uid, c.id, { base_sha: previousBase });
|
|
324706
|
+
c.details = { ...c.details, base_sha: previousBase };
|
|
324707
|
+
const restored = await getTask2(uid, c.id);
|
|
324708
|
+
if (restored?.details?.base_sha !== previousBase) throw new Error("odtworzenie bazy UNKNOWN");
|
|
324709
|
+
} catch (rollbackError) {
|
|
324710
|
+
throw new DispatchHold(`HOLD konflikt: ${errorText5(error48)}; rollback/baza: ${errorText5(rollbackError)}`, false);
|
|
324711
|
+
}
|
|
324712
|
+
throw new DispatchHold(`HOLD konflikt: przygotowanie/zapis bazy: ${errorText5(error48)}`, false);
|
|
324713
|
+
}
|
|
324605
324714
|
if (recreated) throw new DispatchHold(`HOLD recreated: przygotowanie/zapis bazy po rebase: ${errorText5(error48)}`, false);
|
|
324606
324715
|
throw error48;
|
|
324607
324716
|
}
|
|
324608
324717
|
}
|
|
324718
|
+
try {
|
|
324719
|
+
const markers2 = dispatchMarkers ?? addedConflictMarkers(worktree, installation?.baseRef() ?? engineBaseRef(), "working");
|
|
324720
|
+
if (markers2.length) rebaseConflict = `
|
|
324721
|
+
## Potwierdzony konflikt R${counter(asRecord3(c.details?.review).round)}
|
|
324722
|
+
Pliki konfliktu: ${markers2.join(", ")}. usu\u0144 markery zachowuj\u0105c obie zmiany; pliki wyliczane odtw\xF3rz ich generatorem, bez r\u0119cznego scalania. Nie wykonuj git zmieniaj\u0105cego histori\u0119; commit zrobi silnik. Respektuj dotychczasowy write-set; poza zakresem lub decyzja \u2192 ACTIONABLE_BLOCKER z PYTANIE: do CR.
|
|
324723
|
+
`;
|
|
324724
|
+
} catch (error48) {
|
|
324725
|
+
throw new DispatchHold(`HOLD dispatch: odczyt marker\xF3w UNKNOWN: ${errorText5(error48)}`, false);
|
|
324726
|
+
}
|
|
324609
324727
|
(installation?.prepareWorktree ?? prepareHostWorktree)(worktree);
|
|
324610
324728
|
const sparseGuard = [
|
|
324611
324729
|
"",
|
|
@@ -327433,7 +327551,7 @@ async function main2() {
|
|
|
327433
327551
|
if (client && result.outcome !== "ok") console.error(`Fabryka ${result.outcome === "stop" ? "zatrzymana" : "retry"}: ${result.reason}${result.cleanup ? "; finalizacja niepotwierdzona \u2014 sprawd\u017A stan i blokad\u0119" : ""}`);
|
|
327434
327552
|
return client && result.outcome === "stop" ? 2 : code;
|
|
327435
327553
|
}
|
|
327436
|
-
var import_node_fs47, import_gray_matter2, import_node_child_process20, import_node_os14, import_node_sqlite4, import_node_util14, import_node_crypto32, import_node_path52, TASK_REPO, ASSIGNEE, CODEX_HELPER, WORKER_TIMEOUT_MIN, WORKER_MODELS_CONFIG, OPENCODE_LEDGER, MAX_ATTEMPTS, REVIEW_JOB_EXCLUDE, TESTER_DETAILS_KEYS, TESTER_RECOVERY_DETAILS_KEYS, LOCAL_TESTER_LIST_DETAILS_KEYS, CARD_OWNER_DETAILS_KEYS, LANDING_RECOVERY_DETAILS_KEYS, ACTIONABLE_BLOCKER_DETAILS_KEYS, REVIEW_RECOVERY_IDENTITY_KEYS, REVIEW_RECOVERY_DETAILS_KEYS, REVIEW_RECOVERY_FIELDS, REVIEW_SCAN_FIELDS, DECISION_QUEUE_SCAN_FIELDS, DECISION_REFRESH_DETAILS_KEYS, BLOCKED_WORKER_DETAILS_KEYS, ENABLED_SCAN_DETAILS_KEYS, RESERVATION_DETAILS_KEYS, RESERVATION_SCAN_DETAILS_KEYS, OBLIGATION_DETAILS_KEYS, READY_DETAILS_KEYS, RECOVERY_DETAILS_KEYS, PROMOTION_BOARD_DETAILS_KEYS, PROMOTION_DRAFT_DETAILS_KEYS, DRAFT_SUPPLY_DETAILS_KEYS, SCAN_OPTIONS, PROMOTION_BOARD_STATUSES, NORTH_STAR, AUTHORITY, RUNTIME_FILES, STATE2, REVIEW_LAST, HOST_MIN_FREE_GIB, HOST_UNBLOCK_FREE_GIB, DISK_ARTIFACT_MIN_AGE_MS, hostOperationsWakeDb, responseGuardReadErrorLogged, crLivenessIdentityLogged, crBlockerIdentityLogged, tickInstallation, CODEX_LIFECYCLE_HOOK, REQUIRED_CHECKS2, CI_QUEUE_CEILING_MS, reviewText, LAST_TICK, DECISIONS, DECISIONS_REKSIO, BLOCKED_TECH, TEST_LAST, FOR_HERMES, LOCK2, LOG2, configuredTickLimitMs, TICK_LIMIT_MS, START_BUDGET_MS, LAND_BUDGET_MS, TESTER_COMMAND_CEILING_MS, TESTER_FLAKE_RERUN_MS, tickDeadline, DRY2, loadedSha, mainSha, hostStateDir, loadEnvFiles2, SshAuthExhausted, DispatchHold, CODEX_PLUGIN_DATA, EXECUTION_ENV_ALLOWLIST, northStarDeps, skippedCardEvents, LEAD_CLASSES, LEAD_AGENT_WAITING, LEAD_OWNER_WAKE_LIMIT, leadWakeDbMissingLogged, rulingSha, FLAKE_REPAIR_DETAILS_KEYS, flakeKey, ClientReviewBaseChanged, testerRetestRepo, TESTER_RETEST_BACKOFF_BASE_MS, TESTER_RETEST_BACKOFF_MAX_MS, TESTER_RETEST_MAX_ERRORS, TESTER_IDENTITY_RECOVERY_LIMIT, selectorUnavailableTicks, crBlockerIssueLogged, uncertainStarts, processCards;
|
|
327554
|
+
var import_node_fs47, import_gray_matter2, import_node_child_process20, import_node_os14, import_node_sqlite4, import_node_util14, import_node_crypto32, import_node_path52, TASK_REPO, ASSIGNEE, CODEX_HELPER, WORKER_TIMEOUT_MIN, WORKER_MODELS_CONFIG, OPENCODE_LEDGER, MAX_ATTEMPTS, REVIEW_JOB_EXCLUDE, TESTER_DETAILS_KEYS, TESTER_RECOVERY_DETAILS_KEYS, LOCAL_TESTER_LIST_DETAILS_KEYS, CARD_OWNER_DETAILS_KEYS, LANDING_RECOVERY_DETAILS_KEYS, ACTIONABLE_BLOCKER_DETAILS_KEYS, REVIEW_RECOVERY_IDENTITY_KEYS, REVIEW_RECOVERY_DETAILS_KEYS, REVIEW_RECOVERY_FIELDS, REVIEW_SCAN_FIELDS, DECISION_QUEUE_SCAN_FIELDS, DECISION_REFRESH_DETAILS_KEYS, BLOCKED_WORKER_DETAILS_KEYS, ENABLED_SCAN_DETAILS_KEYS, RESERVATION_DETAILS_KEYS, RESERVATION_SCAN_DETAILS_KEYS, OBLIGATION_DETAILS_KEYS, READY_DETAILS_KEYS, RECOVERY_DETAILS_KEYS, PROMOTION_BOARD_DETAILS_KEYS, PROMOTION_DRAFT_DETAILS_KEYS, DRAFT_SUPPLY_DETAILS_KEYS, SCAN_OPTIONS, PROMOTION_BOARD_STATUSES, NORTH_STAR, AUTHORITY, RUNTIME_FILES, STATE2, REVIEW_LAST, HOST_MIN_FREE_GIB, HOST_UNBLOCK_FREE_GIB, DISK_ARTIFACT_MIN_AGE_MS, hostOperationsWakeDb, responseGuardReadErrorLogged, crLivenessIdentityLogged, crBlockerIdentityLogged, tickInstallation, CODEX_LIFECYCLE_HOOK, REQUIRED_CHECKS2, CI_QUEUE_CEILING_MS, reviewText, LAST_TICK, DECISIONS, DECISIONS_REKSIO, BLOCKED_TECH, TEST_LAST, FOR_HERMES, LOCK2, LOG2, configuredTickLimitMs, TICK_LIMIT_MS, START_BUDGET_MS, LAND_BUDGET_MS, TESTER_COMMAND_CEILING_MS, TESTER_FLAKE_RERUN_MS, tickDeadline, DRY2, loadedSha, mainSha, hostStateDir, loadEnvFiles2, CONFLICT_PREPARATION_SUBJECT, SshAuthExhausted, DispatchHold, CODEX_PLUGIN_DATA, EXECUTION_ENV_ALLOWLIST, northStarDeps, skippedCardEvents, LEAD_CLASSES, LEAD_AGENT_WAITING, LEAD_OWNER_WAKE_LIMIT, leadWakeDbMissingLogged, rulingSha, FLAKE_REPAIR_DETAILS_KEYS, flakeKey, ClientReviewBaseChanged, testerRetestRepo, TESTER_RETEST_BACKOFF_BASE_MS, TESTER_RETEST_BACKOFF_MAX_MS, TESTER_RETEST_MAX_ERRORS, TESTER_IDENTITY_RECOVERY_LIMIT, selectorUnavailableTicks, crBlockerIssueLogged, uncertainStarts, processCards;
|
|
327437
327555
|
var init_tick = __esm({
|
|
327438
327556
|
"maszynista/tick.ts"() {
|
|
327439
327557
|
import_node_fs47 = require("node:fs");
|
|
@@ -327589,6 +327707,7 @@ var init_tick = __esm({
|
|
|
327589
327707
|
mainSha = "UNKNOWN";
|
|
327590
327708
|
hostStateDir = () => engineHostStateDir();
|
|
327591
327709
|
loadEnvFiles2 = loadEnvFiles;
|
|
327710
|
+
CONFLICT_PREPARATION_SUBJECT = "maszynista: przygotowanie konfliktu z main";
|
|
327592
327711
|
SshAuthExhausted = class extends Error {
|
|
327593
327712
|
};
|
|
327594
327713
|
DispatchHold = class extends Error {
|
package/dist/roles.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface Role {
|
|
|
17
17
|
export declare function rolesDir(): string;
|
|
18
18
|
export declare function parseRole(file: Role["file"], text: string): Role;
|
|
19
19
|
export declare function loadRoles(dir?: string): Role[];
|
|
20
|
-
export declare const MANAGED_LINE = "<!-- robisie:managed 0.5.
|
|
20
|
+
export declare const MANAGED_LINE = "<!-- robisie:managed 0.5.40 \u2014 plik zarz\u0105dzany przez `npx robisie`; `npx robisie uninstall` go usunie -->";
|
|
21
21
|
export type AgentFlavor = "claude" | "codex" | "opencode";
|
|
22
22
|
/** How the operator starts the Builder for one card in its own session (the card id is not a secret). */
|
|
23
23
|
export declare function builderStartCommand(flavor: AgentFlavor, codexRolePath?: string): string;
|
package/docs/README.en.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# robisie — from account to accepted card (package 0.5.
|
|
1
|
+
# robisie — from account to accepted card (package 0.5.40) <!-- x-release-please-version -->
|
|
2
2
|
|
|
3
3
|
In the project directory with its engine configuration, run `npx robisie init`, then `npx robisie doctor`: init prepares the project goal and tester protection list, and doctor checks both inputs.
|
|
4
4
|
|
package/docs/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# robisie — od konta do odebranej karty (paczka 0.5.
|
|
1
|
+
# robisie — od konta do odebranej karty (paczka 0.5.40) <!-- x-release-please-version -->
|
|
2
2
|
|
|
3
3
|
W katalogu projektu z konfiguracją silnika uruchom `npx robisie init`, potem `npx robisie doctor`: init przygotuje cel projektu i listę ochrony testera, a doctor sprawdzi oba wejścia.
|
|
4
4
|
|
package/package.json
CHANGED