@kynver-app/runtime 0.1.102 → 0.1.103

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/dist/index.js CHANGED
@@ -7367,6 +7367,11 @@ function readAdmissionExhaustion(result) {
7367
7367
  if (!raw || typeof raw !== "object") return null;
7368
7368
  return raw;
7369
7369
  }
7370
+ function readDispatchSkipDrain(result) {
7371
+ const raw = result.dispatchSkipDrain;
7372
+ if (!raw || typeof raw !== "object") return null;
7373
+ return raw;
7374
+ }
7370
7375
  function readHarnessWorkerContext(decision) {
7371
7376
  const raw = decision.harnessWorkerContext;
7372
7377
  if (!raw || typeof raw !== "object") return null;
@@ -7530,6 +7535,7 @@ async function dispatchRun(args) {
7530
7535
  const result = first.result;
7531
7536
  if (dryRun) {
7532
7537
  const admissionExhaustion2 = readAdmissionExhaustion(result);
7538
+ const dispatchSkipDrain2 = readDispatchSkipDrain(result);
7533
7539
  const summary2 = {
7534
7540
  runId: run.id,
7535
7541
  agentOsId,
@@ -7548,7 +7554,8 @@ async function dispatchRun(args) {
7548
7554
  pagesScanned: result.pagesScanned ?? null,
7549
7555
  candidatesExhausted: result.candidatesExhausted ?? null,
7550
7556
  capacityIdle: admissionExhaustion2?.capacityIdle === true,
7551
- admissionExhaustion: admissionExhaustion2
7557
+ admissionExhaustion: admissionExhaustion2,
7558
+ dispatchSkipDrain: dispatchSkipDrain2
7552
7559
  };
7553
7560
  if (pipeline) return { ok: true, ...summary2 };
7554
7561
  console.log(JSON.stringify(summary2, null, 2));
@@ -7738,13 +7745,15 @@ async function dispatchRun(args) {
7738
7745
  }
7739
7746
  const startedCount = outcomes.filter((o) => o.started).length;
7740
7747
  const admissionExhaustion = readAdmissionExhaustion(result);
7741
- const capacityIdle = admissionExhaustion?.capacityIdle === true || startedCount === 0 && Number(result.resourceGate?.slotsAvailable) > 0;
7748
+ const dispatchSkipDrain = readDispatchSkipDrain(result);
7749
+ const capacityIdle = startedCount === 0 && (admissionExhaustion?.capacityIdle === true || Number(result.resourceGate?.slotsAvailable) > 0);
7742
7750
  if (capacityIdle && admissionExhaustion?.summary) {
7743
7751
  const retryCeiling = admissionExhaustion.skipReasonCounts?.retry_ceiling_exceeded ?? 0;
7744
- const recovery = admissionExhaustion.overAttemptIdleRecovery;
7752
+ const recovery = result.overAttemptIdleRecovery ?? admissionExhaustion.overAttemptIdleRecovery;
7745
7753
  const recoveryNote = recovery?.attempted === true ? `; over_attempt_recovery minted=${recovery.minted ?? 0} started=${recovery.started ?? 0}` : retryCeiling > 0 ? "; over_attempt_recovery not attempted" : "";
7754
+ const drainNote = dispatchSkipDrain ? `; dispatch_skip_drain scanned=${dispatchSkipDrain.scanned ?? 0} advanced=${dispatchSkipDrain.advanced ?? 0}` : "";
7746
7755
  console.error(
7747
- `[dispatch] ${admissionExhaustion.summary}${retryCeiling > 0 ? `; retry_ceiling_exceeded=${retryCeiling}` : ""}${recoveryNote}`
7756
+ `[dispatch] ${admissionExhaustion.summary}${retryCeiling > 0 ? `; retry_ceiling_exceeded=${retryCeiling}` : ""}${recoveryNote}${drainNote}`
7748
7757
  );
7749
7758
  }
7750
7759
  const summary = {
@@ -7755,6 +7764,7 @@ async function dispatchRun(args) {
7755
7764
  startedCount,
7756
7765
  capacityIdle,
7757
7766
  admissionExhaustion,
7767
+ dispatchSkipDrain,
7758
7768
  outcomes,
7759
7769
  skipped: skipped.map((d) => ({
7760
7770
  taskId: d.task.id,
@@ -14919,7 +14929,7 @@ async function runLandingMaintainerLaneTick(args) {
14919
14929
  const agentOsId = String(required(String(args.agentOsId || ""), "--agent-os-id"));
14920
14930
  const repoSlug = String(args.repo || LANDING_MAINTAINER_LANE_SPEC.defaultRepo).trim();
14921
14931
  const fleet = args.fleet === true || args.fleet === "true";
14922
- const execute = args.execute !== false && args.execute !== "false";
14932
+ const execute = args.execute === true || args.execute === "true";
14923
14933
  const runId = args.run ? String(args.run) : void 0;
14924
14934
  const resourceGate = observeRunnerResourceGate({
14925
14935
  runId: runId ?? "fleet-lane-tick"