Skip to content

fix: BUG: @hasna/codewith — native loops cannot represent a non-expiring - #558

Merged
andrei-hasna merged 2 commits into
mainfrom
factory/d60366e0-4d66-45a3-ab97-2b7fcc87-82449d4d
Aug 11, 2026
Merged

fix: BUG: @hasna/codewith — native loops cannot represent a non-expiring#558
andrei-hasna merged 2 commits into
mainfrom
factory/d60366e0-4d66-45a3-ab97-2b7fcc87-82449d4d

Conversation

@andrei-hasna

@andrei-hasna andrei-hasna commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Objective

BUG: @hasna/codewith — native loops cannot represent a non-expiring schedule

Triggered by Chief Knowledge coordination task ac9afc48-6357-46cf-879a-c2ebd5891565 and fixed reviewer NO_GO. Repro: manage_loop create always persists a finite expiresAt (default seven days; explicit 4102444800 remains finite), while native readback exposes no non-expiring/null mode and no runtime-owned automatic renewal receipt. This makes the rendered permanent-ten-minute-coordination acceptance gate unreachable. Repair the owning Codewith scheduler with the smallest supported contract: either a true non-expiring recurring loop or a runtime-owned automatic create-first renewal that proves a replacement firing before expiry with no zero-carrier interval. Preserve existing finite-expiry behavior for callers that request it. Required delivery: focused regression tests, PR-first review, release/install, and live manage_loop create/list proof showing the permanent carrier cannot expire; then the same reviewer lineage on ac9afc48-6357-46cf-879a-c2ebd5891565 rechecks only this defect and direct regressions. Do not contact or probe agent-chief-planning.

Verification

  • policy source: base 5b9d962 (immutable commit — agent-proof)
  • containment: env — allowlist env, non-login shell, run-scoped HOME (registry auth seeded for install)
  • install: pass
  • doctor (ci): ok — 11 checks passed (1 advisory)

Run run_8c3826e2e9e0 · backend codewith · task d60366e0-4d66-45a3-ab97-2b7fcc878d3b
🏭 Generated by @hasnaxyz/factory


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

BUG: @hasna/codewith — native loops cannot represent a non-expiring schedule

Triggered by Chief Knowledge coordination task ac9afc48-6357-46cf-879a-c2ebd5891565 and fixed reviewer NO_GO. Repro: manage_loop create always persists a finite expiresAt (default seven days; explicit 4102444800 remains finite), while native readback exposes no non-expiring/null mode and no runtime-owned automatic renewal receipt. This makes the rendered permanent-ten-minute-coordination acceptance gate unreachable. Repair the owning Codewith scheduler with the smallest supported contract: either a true non-expiring recurring loop or a runtime-owned automatic create-first renewal that proves a replacement firing before expiry with no zero-carrier interval. Preserve existing finite-expiry behavior for callers that request it. Required delivery: focused regression tests, PR-first review, release/install, and live manage_loop create/list proof showing the permanent carrier cannot expire; then the same reviewer lineage on ac9afc48-6357-46cf-879a-c2ebd5891565 rechecks only this defect and direct regressions. Do not contact or probe agent-chief-planning.

X-Factory-Run: run_8c3826e2e9e0
X-Factory-Task: d60366e0-4d66-45a3-ab97-2b7fcc878d3b
@andrei-hasna

Copy link
Copy Markdown
Contributor Author

[REVIEW] GO — #558 @ d0c2178 — lens: correctness+security+gates, reviewer unresolved-account001 (1 of 1)

Reviewed candidate

  • Verified HEAD d0c2178 against the supplied freshly fetched origin/main 9301a83.
  • Read git log origin/main..HEAD, the complete two-file diff, the surrounding manage_loop handler and tool schema, and the scheduler persistence/claim/expiry SQL paths.
  • The contract is coherent on reachable paths: omitted expires_at keeps the seven-day default, an integer keeps an explicit finite expiry, and null persists as SQL NULL; existing expiry and claim queries preserve and run NULL-expiry schedules.

Commands and gates

  • bun install — exit 0; setup only, not a repo test gate; 521 packages installed, 0 setup failures.
  • This repository declares no test gate in package.json. No test command was invented.
  • This repository declares no typecheck script.
  • gh pr view 558 --repo hasna/codewith --json statusCheckRollup — exit 0; 28 checks read: 25 SUCCESS, 3 SKIPPED, 0 failed, 0 pending.
    • Bazel test on ubuntu-24.04 for x86_64-unknown-linux-gnu — SUCCESS
    • cla — SUCCESS
    • Check for spelling errors — SUCCESS
    • Blob size policy — SUCCESS
    • cargo-deny — SUCCESS
    • build-test — SUCCESS
    • Build Codewith Linux CLI — SUCCESS
    • Detect changed areas — SUCCESS
    • python-sdk — SUCCESS
    • Bazel test on ubuntu-24.04 for x86_64-unknown-linux-musl — SUCCESS
    • Bazel test on windows-latest for x86_64-pc-windows-gnullvm shard 1/4 — SUCCESS
    • Format / etc — SUCCESS
    • sdks — SUCCESS
    • Bazel test on windows-latest for x86_64-pc-windows-gnullvm shard 2/4 — SUCCESS
    • Bazel test on windows-latest for x86_64-pc-windows-gnullvm shard 3/4 — SUCCESS
    • Bazel test on windows-latest for x86_64-pc-windows-gnullvm shard 4/4 — SUCCESS
    • Bazel test on windows-latest for x86_64-pc-windows-gnullvm (native main) — SKIPPED
    • cargo shear — SUCCESS
    • Argument comment lint package — SKIPPED
    • Bazel clippy on ubuntu-24.04 for x86_64-unknown-linux-gnu — SUCCESS
    • Bazel clippy on windows-latest for x86_64-pc-windows-gnullvm — SUCCESS
    • Verify release build on ubuntu-24.04 for x86_64-unknown-linux-gnu — SUCCESS
    • Argument comment lint - Linux — SUCCESS
    • Verify release build on windows-latest for x86_64-pc-windows-gnullvm — SUCCESS
    • Argument comment lint - Windows — SUCCESS
    • Bazel test on windows-latest for x86_64-pc-windows-gnullvm — SUCCESS
    • CI results (required) — SUCCESS
    • [code]smith — SKIPPED
  • THE LANE'S CHOSEN COMMAND: git diff --check origin/main...HEAD — exit 0; 1 command passed, 0 failures. This was not treated as a repository gate.

Blocking P0/P1 findings

  • None.

Non-blocking follow-ups

  • package.json has no test script; the forge's named build/test checks are the authoritative validation surface for this PR.

@andrei-hasna

Copy link
Copy Markdown
Contributor Author

[REVIEW] NO_GO — #558 @ d0c2178 — lens: correctness+security+gates, reviewer unresolved-account001 (1 of 1)

Blocking P1 finding

  • The required checks did not exercise the tree that would land on current main. After git fetch origin main, origin/main is 9301a83. After git fetch origin refs/pull/558/merge, the tested merge ref first parent is still 5b9d962. Comparing the tested merge-ref tree with the actual current-base merge tree returned TESTED_MERGE_TREE_MATCH_RC=1.
  • The actual current-base merge tree creates cleanly and preserves both changed loop-control files byte-for-byte, but it also contains three newer main-side files absent from the tested tree. The code finding set remains clean; the blocker is that the required build/test gate is stale for the landing candidate.

Focused remedy

  • Update the PR branch with current origin/main, run the staged secret scan before committing, push the new head, and rerun the forge checks. The same reviewer will recheck only this named gate defect, current-head identity, and direct regressions. This NO_GO is live only while d0c2178 remains the PR head.

Agent: unresolved-account001
@andrei-hasna

Copy link
Copy Markdown
Contributor Author

Focused remediation pushed at a885d65.

  • Merged current origin/main 9301a83 into the PR branch without conflicts.
  • The staged secret scan reported no leaks and exited 0 before commit; the pre-push scan also exited 0.
  • The merge commit uses subject chore: refresh PR base for current main and carries exactly one Agent: unresolved-account001 trailer.
  • Push to factory/d60366e0-4d66-45a3-ab97-2b7fcc87-82449d4d exited 0. The prior NO_GO is stale once the PR head readback shows a885d65.

The same reviewer is now waiting for the new exact-head forge checks and will recheck only the stale-gate defect and direct regressions.

@andrei-hasna

Copy link
Copy Markdown
Contributor Author

[REVIEW] GO — #558 @ a885d65 — lens: correctness+security+gates, reviewer unresolved-account001 (1 of 1)

Focused re-review of the named stale-gate defect and direct regressions

  • Current origin/main is 9301a83 and is an ancestor of this head: FINAL_MAIN_ANCESTOR_RC=0.
  • The tested GitHub merge ref first parent is the same current-main SHA, and its tree matches HEAD exactly: FINAL_TESTED_MERGE_TREE_MATCH_RC=0.
  • The remediation changed neither reviewed loop-control file: LOOP_FILES_UNCHANGED_RC=0. The PR diff remains two files, 184 insertions and 10 deletions.
  • Staged gitleaks scan before commit — exit 0, no leaks found. Pre-push staged scan — exit 0, no leaks found. Push to the PR branch — exit 0.

Commands and gates

  • bun install — exit 0 on the reviewed change; setup only, not a repo test gate; 521 packages installed, 0 setup failures.
  • This repository declares no test gate in package.json. No test command was invented.
  • This repository declares no typecheck script.
  • gh pr view 558 --repo hasna/codewith --json statusCheckRollup — exit 0 on this exact head; 28 checks read: 25 SUCCESS, 3 SKIPPED, 0 failed, 0 pending.
    • Bazel test on ubuntu-24.04 for x86_64-unknown-linux-gnu — SUCCESS
    • cla — SUCCESS
    • Check for spelling errors — SUCCESS
    • Blob size policy — SUCCESS
    • cargo-deny — SUCCESS
    • build-test — SUCCESS
    • Build Codewith Linux CLI — SUCCESS
    • Detect changed areas — SUCCESS
    • python-sdk — SUCCESS
    • Bazel test on ubuntu-24.04 for x86_64-unknown-linux-musl — SUCCESS
    • Bazel test on windows-latest for x86_64-pc-windows-gnullvm shard 1/4 — SUCCESS
    • Format / etc — SUCCESS
    • sdks — SUCCESS
    • Bazel test on windows-latest for x86_64-pc-windows-gnullvm shard 2/4 — SUCCESS
    • Bazel test on windows-latest for x86_64-pc-windows-gnullvm shard 3/4 — SUCCESS
    • Bazel test on windows-latest for x86_64-pc-windows-gnullvm shard 4/4 — SUCCESS
    • Bazel test on windows-latest for x86_64-pc-windows-gnullvm (native main) — SKIPPED
    • cargo shear — SUCCESS
    • Argument comment lint package — SKIPPED
    • Bazel clippy on ubuntu-24.04 for x86_64-unknown-linux-gnu — SUCCESS
    • Bazel clippy on windows-latest for x86_64-pc-windows-gnullvm — SUCCESS
    • Verify release build on ubuntu-24.04 for x86_64-unknown-linux-gnu — SUCCESS
    • Argument comment lint - Linux — SUCCESS
    • Verify release build on windows-latest for x86_64-pc-windows-gnullvm — SUCCESS
    • Argument comment lint - Windows — SUCCESS
    • Bazel test on windows-latest for x86_64-pc-windows-gnullvm — SUCCESS
    • CI results (required) — SUCCESS
    • [code]smith — SKIPPED

Blocking P0/P1 findings

  • None. The previously named P1 is fixed and its affected gate passes on the exact current-base merge candidate.

Non-blocking follow-ups

  • package.json has no test script; the forge's named build/test checks are the authoritative validation surface for this PR.

@andrei-hasna
andrei-hasna merged commit f290938 into main Aug 11, 2026
28 checks passed
@andrei-hasna
andrei-hasna deleted the factory/d60366e0-4d66-45a3-ab97-2b7fcc87-82449d4d branch August 11, 2026 19:38
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant