Skip to content

feat: integrate upstream v0.6.4 with CHEK Codex support - #9

Draft
hongzexin wants to merge 996 commits into
mainfrom
codex/multica-runtime-reliability
Draft

hongzexin wants to merge 996 commits into
mainfrom
codex/multica-runtime-reliability

Conversation

@hongzexin

@hongzexin hongzexin commented Oct 21, 2026 •

Copy link
Copy Markdown

Integrates multica-ai/multica v0.6.4 (47120a4131564175da044d63d897ed9b5d76979a) into the CHEK production fork deployed at internal v0.5.2 (e55ab91e0e91f6f1356e76f774b357377def8e5e). CHEK's v0.5.2 tag differs from the upstream tag of the same name.

Preserves company Codex credential issuance, per-task authorization, session/turn auditing, quota increases, Feilian settings, provider-capacity cooldowns, delivered-output protection and storage error handling. Fourteen merge conflicts were resolved while retaining these behaviors.

Upgrade and security changes

  • Preserve the seven deployed company_codex migration basenames and register six CHEK concurrent indexes with upstream recovery hooks. The upgrade rehearsal starts from the deployed schema, seeds synthetic CHEK records, applies migrations twice, and checks the complete ledger, preserved data and valid indexes.
  • Require Go 1.26.10 and patch affected runtime dependencies. Build and scan the actual backend and standalone web containers in PR CI; production repeats the vulnerability gate against immutable digests before promotion. Remove unused npm from the standalone web runtime.
  • Bound mention/model text parsing; restrict example callbacks to the configured HTTPS origin and reject redirects; reject Git option-shaped URLs, remote-helper shorthand and control characters, and separate clone options from URL operands.
  • Confine local object deletion with os.Root, including symlink traversal protection, while retaining idempotent object/metadata/staging cleanup. Reject issue numbers and DingTalk offsets outside the database's 32-bit range.
  • Restore generated SQL models, French company Codex translations and the existing landing-image size budget. Limit workflow token permissions and pin reported third-party Actions.

Validation and unresolved gates

  • Full source CI, mobile verification, deployed-schema upgrade rehearsal and both production-image checks passed on 7440d224. Both image scans on b3e36ee7 had zero HIGH/CRITICAL findings (one backend MEDIUM, two web MEDIUM); 7440d224 also passed the image gates.
  • Locally: 2,302 core tests, 111 model-pricing tests, 8 UI tests, 7 callback security tests, 48 storage tests, 12 mention-stripping tests, repocache tests, targeted ESLint and affected frontend typechecks passed. Node 22 matches CI.
  • The exact issue-number function and its six regression cases passed in an isolated Go module. Local handler tests compile but TestMain skips without PostgreSQL; that exit status is not counted as a handler pass. Current-head CI with real PostgreSQL passed the backend suite, including the issue-number and DingTalk regressions.
  • CodeQL's separate PR security check remains failing. On c4689275, it reported 2 critical, 65 high and 278 medium findings in changed code and warned about the large diff. The repository baseline has 619 open alerts; counts are not confirmed new vulnerabilities. Known findings have been fixed, but remaining paths still need review. No blanket alert dismissal or policy bypass was used.
  • Latest head: c4689275. Full source CI, both runtime-image checks, the deployed-schema upgrade rehearsal and mobile verification all passed. CodeQL analysis completed, but its PR security check still failed. This PR stays DRAFT until security triage and independent review are complete.

Production additionally requires a verified database backup/restore anchor and explicit DO_NOT_TRACK=true in GitOps (ops-bootstrap #3073). This PR has not published or deployed a production image.

Planned internal image version: v0.6.4-chek.1, anchored on reviewed internal main. Rollback baseline: internal v0.5.2 / e55ab91e0e91f6f1356e76f774b357377def8e5e; restore the pre-upgrade database if the newer schema is incompatible with the old binary.

GODVvVZzz and others added 30 commits September 21, 2026 16:25
…multica-ai#8028)

* fix(cli): compare workdir paths in one namespace (MUL-4252)

The containment guard behind --content-file, --description-file and --attachment
canonicalizes the workdir but could not canonicalize a candidate path that does
not exist yet, and compared the two sides in different namespaces. That is wrong
in three ways, and only the first is merely a wrong answer.

## A path inside the workdir read as outside

filepath.EvalSymlinks fails outright when any component is missing. The fallback
resolved one level up (filepath.Dir) and otherwise called filepath.Clean, which
does not follow symlinks at all.

os.Getwd() returns the LOGICAL working directory whenever $PWD names the current
directory, and everything that writes $PWD carries the path as typed: a shell's
`cd`, and the PWD=<workdir> this repo exports to agent processes
(pkg/agent/opencode.go, deveco.go, codearts.go). So on a host whose workdir path
crosses a symlink, the base was /private/var/... while the candidate stayed
/var/..., and `--content-file reports/summary.md` was rejected as a guardrail
violation when the real problem was that `reports/` did not exist. The only
remedy the error offers is --allow-external-file, so the caller's next move is to
disable the guard and collect an unrelated not-found error on the retry.

## A path outside the workdir read as inside

With an already-canonical workdir the same fallback inverts. `escape/sub/x.md`,
where `escape` is a symlink pointing out of the workdir, read as INSIDE it: the
unresolvable tail fell back to a lexical clean that never sees the symlink.

## ".." was applied to the string, not to the followed path

filepath.Join and filepath.Clean collapse "escape/.." before any symlink is
followed, while the kernel follows `escape` out of the workdir first and then
goes up. So the guard judged a different path than os.ReadFile then opened:

  guard says within=true ; os.ReadFile got "another run's file"

That is the MUL-4252 failure this guard exists to prevent — reading a file left
behind by another run — reachable with a file that exists and no race.

## A path on another volume read as an internal failure

Windows only: filepath.Rel cannot relate two absolute paths on different volumes
and returns an error, which surfaced as `Rel: can't make Z:\report.md relative to
C:\Users\...\workdir`. Two absolute paths Rel cannot relate are on different
volumes, which is as far outside the workdir as a path gets, so the guard now
answers that instead.

## The fix

util.ResolveSymlinksBestEffort canonicalizes as far as the filesystem allows: it
resolves the path as given first — the only step that can see ".." the way the
kernel does — then walks up to the deepest existing ancestor, resolves that, and
re-attaches the missing tail lexically. A mismatch inside the missing tail is
inert: a path whose intermediate directories do not exist cannot be opened at
all. Both sides of the comparison go through it.

internal/daemon/execenv already had this algorithm as resolvePathBestEffort,
unexported and documented as Python's Path.resolve(strict=False). It now
delegates, so there is one owner, and the ".." handling makes it more faithful to
that documented contract rather than less.

## Coverage

TestFileWithinWorkingDir runs its table under two working-directory shapes, and
both are load-bearing: under a symlinked workdir an unresolved candidate always
looks outside, so the symlink-escape rows can only fail under a canonical
workdir. Reverting one part of the mechanism at a time:

  candidate unresolved (Clean)        5 tests / 15 subtests fail
  one-level fallback                  3 tests /  8 subtests fail
  base side left unresolved           5 tests /  9 subtests fail
  clean before resolve ("..")         2 tests /  5 subtests fail
  helper walks only one level          4 tests /  9 subtests fail

The lint side is covered too: classifyLocalPathTarget uses the same predicate,
and there the same false negative flips direction — a workdir-local path with a
missing intermediate directory matched neither of its signals, so the link was
published instead of blocked.

cmd/multica has no Windows job, so the guard's Windows-only behaviour ran
nowhere: a candidate on another volume, and a directory junction, which
filepath.EvalSymlinks resolves to its own name rather than descending through it
(internal/daemon/config_windows_test.go asserts that refusal directly). A
junction inside the workdir pointing out of it therefore still reads as inside,
before this change and after it. Failing closed on a component that exists but
cannot be canonicalized would reject every path under a pnpm-style node_modules
junction, and on a host whose workdir is itself reached through a junction it
would reject every --content-file and --attachment on that host — a larger break
than the one it prevents. The windows-tagged test pins the gap with the
observations it rests on and fails with instructions if the platform starts
resolving junctions. Its CI step is scoped and runs with -v so a silent skip is
visible rather than passing as "ok".

* fix(cli): lead with the missing file when a rejected path does not exist (MUL-4252)

The workdir containment guard answers one question and reports it as if it
answered two. A path outside the workdir that does not exist got the same error as
a stale file sitting in /tmp:

  --content-file path "/tmp/desc.md" resolves outside the current working
  directory; write agent temp files inside the task workdir ... Pass
  --allow-external-file to override.

The only remedy that error offers is the flag, so the caller's reasonable next
move is to disable the guard and retry — earning a second, unrelated "no such
file or directory". The diagnosis points away from the actual problem, and the
lesson it teaches an agent is to turn the guard off.

MUL-4252 was about reading a file that exists and belongs to another run. When
the path does not exist there is no such file to protect anyone from, so the
missing file leads, with the containment problem kept as the second clause since
the caller still needs to know the flag would not help.

pathExists treats any stat error other than "not exists" as "exists", so a
permission wall or a broken mount keeps the guard's own wording and stays
fail-closed rather than being reported as a missing file.

Both halves are pinned by mutation: dropping the branch fails
TestExternalFileErrorLeadsWithMissingFile on the missing-file assertion, and
making pathExists report everything as missing fails the same test on the
assertion that an existing external file must still be told about
--allow-external-file.

* fix(cli): preserve Windows path kinds and resolve junctions in the containment guard (MUL-4252)

Addresses the two blockers in the review on 3ec1781:

1. absNoClean prefixed the working directory onto every non-IsAbs path,
   but on Windows a root-relative path (\tmp\desc.md) resolves against
   the volume ROOT and a drive-relative path (C:tmp\desc.md) against the
   current directory on that drive. The guard inspected
   C:\task\workdir\tmp\desc.md while os.ReadFile opened C:\tmp\desc.md,
   so an in-workdir shadow could pass an outside read. absNoClean now
   splits per platform (path_other.go / path_windows.go) and preserves
   the kinds; a drive-relative path on an unobservable drive is handed
   back uncanonicalized and fails closed through the Rel branch.

2. The junction case in workdir_guard_windows_test.go pinned a known
   contract violation (EvalSymlinks refuses to descend through junctions
   under the winsymlink semantics this module ships with). Resolution is
   now component-wise on Windows (evalPath) and follows junctions via
   os.Readlink — which answers under both winsymlink settings — with a
   bounded follow budget; reparse points Readlink cannot speak for
   (OneDrive placeholders) stay opaque. A junction out of the workdir is
   rejected, one into it (the pnpm shape) is still admitted, and the
   known-gap test is replaced by cases asserting both directions plus a
   chain and a dead target.

The shared walk in ResolveSymlinksBestEffort is now component-wise on
both platforms: it applies ".." to the resolved prefix even when the
tail is missing (previously the second phase started from filepath.Abs,
which cleans first), and it never depends on what EvalSymlinks does at
a filesystem root. Unix behaviour is unchanged for every shape the
existing tests cover; the new dot-dot-in-the-walk case pins the
difference.

* fix(cli): classify link targets with the full Windows path grammar and resolve unknown reparse points by handle (MUL-4252)

Addresses the two blockers in the review on d3d3703:

1. Link targets were spliced onto the link's parent unless
   filepath.IsAbs said otherwise, but the kernel applies the full path
   grammar to targets: a root-relative target (\outside) resolves from
   the root of the volume the link sits on, and a volume-GUID target
   (\\?\Volume{GUID}\...) is absolute in the device namespace. The
   resolver now classifies targets through classifyTarget, which reuses
   the same grammar as absNoClean; device-namespace targets without a
   Win32 spelling are kept verbatim so the containment comparison fails
   closed across the namespace instead of splicing a mangled relative
   path (the prefix rules mirror internal/daemon's multica-ai#6883 handling).

2. An os.Readlink failure on a ModeIrregular reparse point no longer
   means "does not redirect". Readlink decodes only the symlink and
   mount-point tags; other name-surrogates (e.g. container-isolation
   links) redirect through a filter while the lexical location stays
   behind. Such components are now resolved through
   GetFinalPathNameByHandle (zero desired access, so no hydration, and
   FILE_FLAG_BACKUP_SEMANTICS for directories); if the handle names the
   same path the component is opaque, otherwise the walk continues from
   the final path. When even the handle cannot name the location the
   resolver returns the new util.ErrUnresolvablePath instead of
   guessing: fileWithinWorkingDir treats it as outside (fail closed)
   and execenv's delegate falls back to the input, which its
   containment comparison rejects.

ResolveSymlinksBestEffort now returns an error so the fail-closed case
is explicit rather than a look-alike path. Negative tests cover a
root-relative symlink target with an in-workdir shadow (the kernel's
target is verified by content before asserting rejection) and a
volume-GUID junction target with the prefix-stripped shadow.

* fix(cli): classify drive-absolute link targets before the volume check (MUL-4252)

classifyTarget asked VolumeName before IsAbs, but VolumeName is
non-empty for a drive-absolute path (C:\dir) too. A junction's absolute
target was therefore misread as drive-relative and resolved against the
working directory — a nonexistent spelling — which errored the
resolution and left the escape to be judged lexically inside the
workdir. The IsAbs branch is asked first, and the load-bearing ordering
is pinned by TestClassifyTarget, a fixture-free table over the target
grammar that would have caught this without a filesystem.

* ci: run the util link-target classification table on Windows

TestClassifyTarget pins the branch ordering classifyTarget's link-target
grammar depends on, but windows-tagged tests in internal/util had no
execution point: the windows-execenv job only ran the guard tests in
cmd/multica. Scoped to the table by name, matching the job's pattern.

* test(cli): correct classifyTarget expectations for root and base shapes

The walk base is the volume root and the working directory's components
live in the segments for a drive-relative target, and the plain-relative
branch returns the link's directory verbatim without a trailing
separator. The expectations said otherwise; the code was right.

---------

Co-authored-by: weiweiwei <weiweiwei@xiaomi.com>
…piry (MUL-5850) (multica-ai#8633)

* test(wakeups): accept lock_not_available from losing concurrent dispatchers

dispatch sets lock_timeout 50ms so a contended rule fails fast and Tick
retries it next round. When the winning transaction runs past 50ms, as on
a slow CI runner, the losers get SQLSTATE 55P03. The test asserted every
dispatch returned nil; the contract is one winner and one run.

Co-authored-by: multica-agent <github@multica.ai>

* fix(wakeups): bound receipt expiry with a materialized batch

DeleteExpiredWakeupReceipts deleted by id IN (SELECT ... LIMIT 1000 FOR
UPDATE SKIP LOCKED). With a nested-loop semi join the planner rescans that
subquery per outer row; each rescan skips rows the DELETE already removed,
so the LIMIT window slides and the statement deletes every expired row.
Plan choice follows table statistics, which made
TestIssueWakeupReceiptExpiryIsBoundedAndKeepsPending flaky. A MATERIALIZED
CTE evaluates the batch once.

Co-authored-by: multica-agent <github@multica.ai>

* test(squads): refresh the shared runtime heartbeat before briefing claims

The squad briefing claim tests run on the TestMain runtime, whose
last_seen_at is written once at suite start. ClaimAgentTask skips runtimes
unseen for RuntimeClaimFreshnessSeconds (150s); on a slow -race runner this
late file starts past that and the claim returns {"task":null}. Refresh
the heartbeat first, as agent_builder_test does, and keep the response body
for the failure message.

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: multica-agent <github@multica.ai>
…MUL-7554) (multica-ai#8634)

The Windows brief only knew PowerShell: the per-turn reply cookbook and
the Comment Formatting cleanup line assumed every Windows agent pastes
into PowerShell. The daemon knows the host OS, not the shell behind the
agent's command tool. Claude Code runs Git Bash for its Bash tool, and a
user who turns off its PowerShell tool (CLAUDE_CODE_USE_POWERSHELL_TOOL=0,
GitHub multica-ai#8627) gets a cookbook whose 'if ($LASTEXITCODE ...)' line is a
bash syntax error that fires AFTER the post succeeded, so the agent sees
a failure and may re-post.

Render one variant per shell on Windows (PowerShell with the
$LASTEXITCODE gate, Git Bash with '&&') and tell the agent to pick the
one its command tool runs. The shell-execution test now selects the
block by shell and adds a windows/git-bash case that runs the bash
variant under sh.

Co-authored-by: multica-agent <github@multica.ai>
…er (MUL-7557) (multica-ai#8642)

Migration 518/520 (multica-ai#8467) registered stop_issue_wakeups, an AFTER UPDATE
OF status trigger on issue that disabled issue_wakeup rows and cancelled
queued/deferred wakeup runs in agent_task_queue. That is a database-level
cascading update, which the repository's migration rules forbid.

Drop the trigger and function (migration 533) and apply the same close rule
in the transaction that writes the status: single and batch issue updates
and the merged-PR auto-close. Cancelled runs are now broadcast after commit.

Co-authored-by: multica-agent <github@multica.ai>
* Revert "MUL-7480: Link delivered steers to final replies (multica-ai#8623)"

This reverts commit 3de6275.

Co-authored-by: multica-agent <github@multica.ai>

* Revert "fix: preserve active task intent in steer frames (multica-ai#8621)"

This reverts commit b866dac.

Co-authored-by: multica-agent <github@multica.ai>

* Revert "MUL-7480: Steer active agent turns from comments (multica-ai#8605)"

This reverts commit 8ce795b.

Co-authored-by: multica-agent <github@multica.ai>

* chore(db): remove reverted comment steer schema

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: Sol-Boy <github@multica.ai>
…ltica-ai#8640)

Add the 2026-09-21 changelog entry in all four locales and set the web and desktop app versions to 0.5.1. Steering is left out — it is not shipping today.
…MUL-7417) (multica-ai#8638)

* fix(cursor): own Windows background shells by launch Job membership (MUL-7417)

captureCursorBackgroundProcess on Windows walked a machine-wide PID->PPID
snapshot to prove a reported shell descends from the launch and to find
its pre-existing children. Windows keeps a child's recorded PPID after
the parent exits and reuses the PID, so the walk could reach a process
owned by someone else; opening it failed with 'Access is denied' or
'not an owned descendant' and the whole capture aborted. The daemon then
fell back to the idle watchdog and a Cursor run that later went quiet
took the 10-minute watchdog path instead of completing. In CI this was
TestCursorBackgroundLifecycle/multiple failing about 2 runs in 43.

Take candidates from the launch's own Job Object instead
(QueryInformationJobObject / JobObjectBasicProcessIdList). Descendants
inherit the Job at creation and cannot leave it, so membership is the
ownership proof: the parent-chain walk goes away, the PPID snapshot is
used only to attach a member's pre-existing children, and a member that
exits or is reused between listing and open is skipped instead of
failing the capture. Creation ordering still tells a real child from
one that points at a reused parent PID.

Restore TestCaptureCursorBackgroundLateDescendant on Windows; it was
excluded for exactly this race.

ci.yml runs the Windows Cursor step with -count=20 on this PR only to
show the race is gone; it is reverted before merge.

Co-authored-by: multica-agent <github@multica.ai>

* ci: restore -count=1 on the Windows Cursor background step

The -count=20 stress run on this PR passed (run 35580440594, windows-execenv);
the per-merge step goes back to a single pass.

Co-authored-by: multica-agent <github@multica.ai>

* fix(cursor): complete the Job member list and refuse unopenable live members (MUL-7417)

Review follow-ups on multica-ai#8638:

- cursorJobProcessIDs grew its buffer only on ERROR_MORE_DATA. The kernel
  can also return success with NumberOfProcessIdsInList short of
  NumberOfAssignedProcesses, which a Job over the initial capacity or one
  growing during the query would hit; the short list then passed for the
  membership and could reject the target or leave children out. Retry
  until the counts agree, fail explicitly if they never do, and make the
  initial capacity a package var so a three-process tree exercises the
  growth path in a test.

- The child walk skipped every open failure as 'exited or reused'. A live
  member whose DACL denies PROCESS_SET_QUOTA|PROCESS_TERMINATE also fails
  to open, and skipping it left the capture reporting success with that
  member outside the tool Job. Skip only PIDs proven to carry no member
  (handle outside the launch Job, or no longer listed after a re-query,
  confirmed by one more open); otherwise fail the capture so the caller
  takes its existing watchdog fallback. OpenProcess goes through a
  package var so a test can make a live member unopenable.

Windows-only tests cover both, plus the plain claim-and-terminate path
for a shell with a pre-existing child.

Co-authored-by: multica-agent <github@multica.ai>

* test(cursor): name the Job list growth test so the Windows CI filter runs it

The windows-execenv step selects 'TestCursorBackground|TestCaptureCursorBackground';
TestCursorJobProcessIDsGrowsPastInitialCapacity matched neither and never ran.

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: multica-agent <github@multica.ai>
…L-7318) (multica-ai#8348)

The WeCom outbound path had two silent exits: a completion whose delivery row
named another platform, and one with no delivery row at all. From outside they
were one quiet return, so an answer that reached the transcript but never the
chat could not be told apart from ordinary traffic on the shared bus.

Both now name themselves in the closed outcome set: not_wecom_turn (DEBUG),
no_delivery_row (WARN, the one skip worth an alert — in practice a task
enqueued before an upgrade), and route_unattributable (DEBUG) for a turn with
no route and no batch owner to attribute it to. The metrics Help and logs draw
the drop/skip line by obligation rather than by whether a frame was written,
and tests pin that wording.

The origin gate is one keyed read (GetTaskChannelOrigin) in place of
GetAgentTask plus TaskInputIsChannelIngested. It also reports whether the
batch owner is known, so an owner-less row is delivered when a route exists
and stays quiet when none does — which keeps the auto-retry of a legacy
channel turn answering its room.

Co-authored-by: J <bohan@devv.ai>
…ultica-ai#8680)

* fix(prompts): remove no-start guidance from runtime briefs

Co-authored-by: multica-agent <github@multica.ai>

* fix(skills): remove no-start guidance from platform instructions

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: multica-agent <github@multica.ai>
* fix(ui): reduce text shimmer repainting (MUL-7466)

Co-authored-by: multica-agent <github@multica.ai>

* docs(ui): drop ShimmerText doc and screenshot (MUL-7466)

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: Multica Eve <273080382+multica-eve@users.noreply.github.com>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: Bohan-J <bhjiang@outlook.com>
…ltica-ai#8314)

* fix(server): wake guest squad leaders on worker replies

* fix(server): ignore tombstoned guest delegations

* fix(server): preserve assigned squad routing under tombstones

* test(server): narrow guest squad routing coverage

Co-authored-by: multica-agent <github@multica.ai>

* test(server): cover member-assigned guest squads

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: Sol-Boy <sol-boy@multica-ai.local>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: Forge-Boy <forge-boy@multica-ai.local>
Co-authored-by: multica-agent <github@multica.ai>
* perf(db): index GitHub PR address lookups (MUL-7556)

Co-authored-by: multica-agent <github@multica.ai>

* perf(db): narrow GitHub PR address index (MUL-7556)

Co-authored-by: multica-agent <github@multica.ai>

* fix(migrations): renumber GitHub PR address index

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: Forge-Boy <forge-boy@multica-ai.local>
Co-authored-by: multica-agent <github@multica.ai>
…kspaces (multica-ai#8678)

* fix(execenv): pin per-agent workspaces under the OpenClaw agents.entries schema

OpenClaw 2026.8 retired the agents.list config path and reports it as
"Unknown config path: agents.list", moving the agents to a map keyed by agent
id under agents.entries. The per-task wrapper only ever wrote
agents.defaults.workspace, and an agents.entries.<id>.workspace entry outranks
it verbatim: on a host where adding a second agent pinned the gateway agent to
an absolute workspace, every task ran in that pinned directory instead of its
prepared workdir, so the workdir skills/ never loaded and the agent edited the
wrong tree.

Read agents.entries when agents.list is gone, pin every entry workspace to the
task workdir on write-back, and keep the registry fallback for the generations
that have neither config path. The stdout-envelope branch now matches the
path-aware wording, so a 2026.8 host that prints its envelope without exiting is
read instead of failed closed, and the entries probe shares the agents.list
deadline so the worst case stays three CLI deadlines.

Co-authored-by: multica-agent <github@multica.ai>

* test(execenv): cover the agents.entries probe, write-back and shared deadline

Adds the regressions the review of the earlier attempt asked for: the current
"Unknown config path" envelope with err == nil selects the entries probe and
never the registry, both the plain and the managed-MCP flows pin every
agents.entries.<id>.workspace to the task workdir, a valid-but-unset entries
path falls back to the registry, and an envelope naming an unrelated path still
fails closed.

The worst-case budget test now drives the five-invocation chain and pins the
config-schema pair to one shared deadline, so a fourth budget fails loudly.

Co-authored-by: multica-agent <github@multica.ai>

* fix(execenv): pin agents.entries workspaces without copying the entry

Review feedback on the write-back: `config get` redacts the config before it
returns the path it was asked for, so every sensitive per-agent field comes back
as `__OPENCLAW_REDACTED__`. The wrapper is a sibling of the user's config in the
$include merge and siblings win, so copying the resolved entry would write that
sentinel over the user's real secret — memory search API key, web fetch headers,
sandbox SSH credentials — for every task on the host, and nothing on OpenClaw's
load path restores it. `agents.entries` is an object keyed by id and objects
merge recursively, so `{"<id>": {"workspace": "<workdir>"}}` is enough to pin the
workspace while every other field still arrives from the user's own config.

The same reasoning drops the resolved payload from the row representation: an
entries row now carries the id marker alone, so no redacted copy of the user's
agent config is held in memory or written to the discovery cache file.

Since only the source still decides the write-back, it is now carried
explicitly (`openclawAgentsSource`: list / entries / registry) rather than as a
boolean that effectively meant "not agents.list", and the source is recorded in
the cache entry so a hit rebuilds the same wrapper. The cache shape version is
bumped, so an entry written by an older daemon is a clean miss.

Co-authored-by: multica-agent <github@multica.ai>

* test(execenv): assert the entries write-back emits workspace alone

Review feedback: the tests encoded the old contract (name / model carried into
the wrapper verbatim). They now assert the wrapper carries exactly one key per
entry — `workspace` — and that nothing else from the resolved payload reaches
the file OpenClaw reads.

The new regression drives the redaction shapes upstream's own redact-snapshot
suite covers (memory search apiKey, web fetch headers, sandbox SSH credentials)
through the entries probe of a real preparation, and fails if any of them ends
up in the wrapper: with the copying write-back restored it reports the sentinel
in `agents.entries.main`. The unit test for the write-back gate also covers a
half-marked list, which a quiet per-row filter would have pinned anyway.

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: tianshuai1 <tianshuai1@huya.com>
Co-authored-by: multica-agent <github@multica.ai>
…ultica-ai#8684)

Autopilot and channel-created issues publish issue:created with a map payload; the activity listener only accepted the HTTP IssueResponse struct and silently dropped the creation activity. Reuse the existing extractIssueFields normalizer so both payload shapes record and broadcast the created entry.
…8689)

* feat(issues): create with properties atomically

Co-authored-by: multica-agent <github@multica.ai>

* fix(issues): recover unavailable properties in create drafts

Co-authored-by: multica-agent <github@multica.ai>

* test(issues): isolate commit failure task assertions

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: Forge-Boy <forge-boy@multica-ai.local>
Co-authored-by: multica-agent <github@multica.ai>
…in French (multica-ai#8716)

The dialog keeps the primitive's sm:max-w-sm, which leaves 352px of
footer. Its two actions are phrases, not "Cancel" and "Save", and the
confirm button also carries the send-shortcut keycaps. Measured in Inter
Medium 14px with the button padding and border:

    en  "Don't start yet" + "Confirm assignment"          ~325px — fits
    fr  "Ne pas démarrer maintenant" + "Confirmer
        l'assignation"                                     ~435px — 83px over

Buttons are whitespace-nowrap and the footer is a single flex row, so the
overflow landed on DialogContent's overflow-auto and showed a horizontal
scrollbar on every assignment in French.

sm:max-w-lg leaves 480px, which fits the French pair with room to spare
(sm:max-w-md, at 416px, would still overflow). The footer also gets
sm:flex-wrap, so a longer translation or a larger text size stacks the
actions instead of bringing the scrollbar back. English renders as before.

Co-authored-by: Atelier Nuvio <atelier@foxace.local>
…ltica-ai#8673)

* feat(telegram): inline recent group context on @mentions

When a member @-mentions the bot in a group, the agent only ever saw that
single line. Lark solves this with a <recent_context> prefetch
(lark/inbound_enricher.go, MUL-3084); Telegram could not copy it because
the Bot API has no history endpoint — getUpdates is consume-once.

Each installation's polling loop now keeps an in-memory ring of the last
DefaultRecentContextSize (10) human group messages per chat and per forum
topic, and inlines that window as a <recent_context> block ahead of an
addressed group message, in the same recent → quoted → own composition
Lark uses. The trigger and an explicitly quoted parent are excluded from
the window; /new starts a chat without ambient context; p2p chats and
unaddressed messages are never enriched. Unaddressed chatter is still
never persisted or turned into a session (MUL-2671): it only surfaces as
read-context on a turn a member directed at the bot, and the ring dies
with the polling loop.

The docs now say what the window contains and that Group Privacy must be
off in @Botfather for the bot to receive the surrounding messages at all.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* docs(telegram): state the recent-context retention and privacy contract accurately

Review follow-up for multica-ai#8673. Setup step 4 now presents Group Privacy on as
the default, minimal-visibility choice and turning it off as the optional
step that enables recent group context, with its cost spelled out. The
Groups section no longer claims unaddressed chatter is "never stored": it
says the message is held in a short in-memory buffer and saved with any
addressed turn that pulls it in, that a reply to the bot triggers the
context just like an @-mention, what Telegram delivers under each privacy
setting, and that an admin bot receives everything regardless. Same fix in
zh/ja/ko. The two code comments that relied on privacy mode being on, or
claimed the message was never persisted, now describe the real contract.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…ANX-3) (multica-ai#8400)

* fix(daemon): recover quick-create writes and task start acknowledgements

* fix(daemon): fence task start retries by claim generation

* fix(daemon): align start claims with main and canonical UTC
Expose the supported PowerShell installer alongside the existing macOS/Linux command in the runtime dialog, onboarding, and landing download section.
Co-authored-by: multica-agent <github@multica.ai>
multica-ai#8730)

The shared template repo is built once per test binary and handed to every
test as an os.CopyFS copy, so nothing may write inside it after
buildTestRepoTemplate returns. git commit breaks that: it forks a detached
`git maintenance run --auto` and returns without waiting, leaving a
background process that creates and removes lock files under .git/.

CopyFS then lists .git/objects/maintenance.lock and fails to open it once
maintenance has removed it, failing whichever test happened to call
newTestRepo at that moment — most recently
TestGitRootLockTimeoutDoesNotAdviseDeletingTheLock on an auth-only PR
(multica-ai#8706), which touches nothing in this package.

Disable auto maintenance in the template's config. Copies inherit it, so the
git commands tests run against their own copy cannot spawn a background
process that races their assertions either.

Co-authored-by: multica-agent <github@multica.ai>
…8712)

Comment owner routing loaded every task row on an issue, including context/result payloads, before selecting the current thread owners. Filter by issue and root comment in SQL and return one agent/squad pair per owner.

Closes multica-ai#8711
…rect (1/2) (multica-ai#8691)

* feat(server): add the duplicate-mark column and keep it correct (MUL-7349)

Expand step for marking an issue as a duplicate of another. A duplicate
is an ordinary cancelled issue that records which issue it duplicates;
there is no duplicate status. This release adds the column and the code
that maintains it, and nothing writes a pointer yet.

- A mark survives only a write that leaves an already cancelled issue
  cancelled. Every other write drops it, so reopening removes a mark and
  cancelling again does not bring one back. Both status-writing queries
  carry the rule, which covers the UI, batch updates and background
  writers.
- Deleting an issue clears the pointers of its duplicates in the same
  transaction, the way deleting a parent detaches its children.

Shipping this before marking is what makes marking safe to roll back: the
release a rollback lands on already clears the pointer. Tests seed a mark
the way the next release will write it.

Co-authored-by: multica-agent <github@multica.ai>

* fix(server): compute issue updates from the locked row (MUL-7349)

UpdateIssue built its next_* values in a CTE that read the row before
the UPDATE took its row lock. A write that waited there behind another
transaction then resumed with the values it had read before the wait and
wrote them back, so an ordinary priority or status edit could restore a
duplicate mark the other transaction had just cleared — by reopening the
issue or by deleting its original — and did_change/did_activity were
decided against the pre-wait row as well.

Lock the row in the CTE instead, so every computed value comes from the
row the statement is about to write. Tests hold the clearing transaction
open and wait for the update to block on the row lock, so the
interleaving is deterministic; both fail without this change.

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: J <bohan@devv.ai>
Co-authored-by: multica-agent <github@multica.ai>
SATA260 and others added 13 commits October 20, 2026 12:34
…ltica-ai#9112)

* fix(issues): use navigation hash for comment deep links

Co-authored-by: Cursor <cursoragent@cursor.com>

* test(issues): isolate comment deep-link component mocks

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
…ultica-ai#7580)

* fix(runtimes): revoke access when making runtime private

* fix(runtimes): regenerate queries for workflow step

---------

Co-authored-by: m2keloop <lanqing@echo.tech>
…IC-336) (multica-ai#9276)

* fix(desktop): navigate existing reserved workspace slugs

Co-authored-by: multica-agent <github@multica.ai>

* fix(core): bind workspace slug lookup to the mounted provider (MUL-8028)

- Bind the reserved-slug membership lookup from QueryProvider's effect
  instead of createQueryClient(), so StrictMode's discarded extra client
  can never become the bound one; unbind is owner-checked.
- Only skip legacy unscoped-link prefixing for a path that is a known
  member workspace + workspace route, so /chat in content still becomes
  /<current>/chat (chat is not a reserved slug).
- Group the new tests under describe blocks and cover both regressions.

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: Multica Eve <273080382+multica-eve@users.noreply.github.com>
…ai#9351)

* fix(chat): stop hidden floating message views

Co-authored-by: multica-agent <github@multica.ai>

* fix(chat): start floating follow before bounds settle

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: multica-agent <github@multica.ai>
…ing (multica-ai#9287)

* fix(daemon): treat a DSH profile without the runtime as missing

A refused plugin install leaves package.json behind. Counting that file as installed made later probes look transient and blocked self-heal.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(daemon): keep a DSH profile directory after a failed install

A failed install must not delete profiles/multica, because that directory may already hold the user's files. A skeleton manifest is already treated as missing, so the next restart retries without probing.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
…ills (multica-ai#9346)

* fix(execenv): normalize required metadata for Codex user skills

Co-authored-by: multica-agent <github@multica.ai>

* fix(execenv): preserve user skill frontmatter formatting when filling metadata

Inject missing name/description lines instead of re-marshalling the map, so
comments, key order and CRLF endings survive; present-but-empty values are
replaced on the yaml.Node tree. Fix stale expected values in test messages.

MUL-8095

Co-authored-by: multica-agent <github@multica.ai>

* fix(execenv): only repair what Codex rejects and verify every repair

Codex falls back to the directory name for a missing/blank name and only
requires a non-empty description, so stop injecting name. The one-line
insert is kept for plain block mappings but now re-parsed; flow, indented
and other mappings go through the node rewrite, which expands aliases of a
replaced anchored value and keeps its comments. Every repair must parse and
leave all other fields equal, otherwise the skill is skipped.

MUL-8095

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: JC的AI分身 <tangyuanjc@JCdeAIfenshendeMac-mini.local>
Co-authored-by: multica-agent <github@multica.ai>
…9352)

* feat: add workflow management entry to issue properties

Co-authored-by: multica-agent <github@multica.ai>

* fix(desktop): open non-issue pages in browser from issue window navigation

The issue workflow card's Manage button pushes a settings path. The issue
window adapter silently dropped non-issue paths, so the click only closed
the card. push/replace now hand such paths to the browser, matching the
content-link handler.

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: multica-agent <github@multica.ai>
…MUL-8099) (multica-ai#9355)

Co-authored-by: multica-eve <273080382+multica-eve@users.noreply.github.com>
Co-authored-by: multica-agent <github@multica.ai>
…ltica-ai#9353)

Co-authored-by: multica-eve <273080382+multica-eve@users.noreply.github.com>
Co-authored-by: multica-agent <github@multica.ai>
Merge multica-ai/multica 47120a4. Preserve managed credentials, task authorization, audit records, quota increases, provider cooldowns, delivered-output protection, and storage error handling. Retain deployed migration identities and add a deployed-schema upgrade rehearsal.
Raise Go to 1.26.10 for GO-2026-6809 and gate CHEK image promotion on govulncheck. Preserve the provider-capacity retry regression under the updated task-service signature.
Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/ci.yml Fixed

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

try {
return { cert: readFileSync(cert), key: readFileSync(key) };
} catch (error) {
console.error(`Could not read ${cert} / ${key}: ${error.message}`);
try {
return { cert: readFileSync(cert), key: readFileSync(key) };
} catch (error) {
console.error(`Could not read ${cert} / ${key}: ${error.message}`);
// TitleEditor is a contenteditable, not an <input> with a placeholder attr.
await page.getByRole("textbox", { name: /project title/i }).fill("Release line");
await page.getByRole("button", { name: /repos/i }).first().click();
await page.getByPlaceholder(/github\.com\/owner\/repo/i).fill(REPO);

await user.type(screen.getByPlaceholderText(/project title/i), "API delivery");
await user.click(
screen.getByRole("button", { name: (name) => name.includes(apiRepoUrl) }),
last_attempt: body.attempt ?? 1,
};
await callback(body, "PUT", `/storage/workspace/${PULSE_KEY}`, { value: JSON.stringify(pulse) });
console.log(`pulse ${pulse.count} delivery ${pulse.delivery_id} attempt ${pulse.last_attempt}`);
try {
const previous = await loadPulse(body);
if (previous.delivery_id === body.delivery_id) {
console.log(`duplicate delivery ${body.delivery_id} attempt ${body.attempt}`);
// Server-side error frames have shape {error: "..."}; log and drop.
// Reconnect loop is bounded by auth-store's 401 handler eventually
// tearing this client down via disconnect().
this.logger.warn("[ws] frame without a string type", event.data);
await page.evaluate((srcdoc) => {
const state = { ran: 0, navigated: 0 };
(window as unknown as { __surfaceState: typeof state }).__surfaceState = state;
window.addEventListener("message", (event) => {
req.headers["x-multica-timestamp"],
);
if (!verified.ok) {
console.warn(`refused ${req.url}: ${verified.reason}`);
return
}
if r.Context().Err() != nil {
d.logger.Debug("repo checkout cancelled", "url", req.URL, "error", err)

if d.repoCache == nil {
http.Error(w, "repo cache not initialized", http.StatusInternalServerError)
return
}

if err := d.ensureRepoReady(r.Context(), req.WorkspaceID, req.URL); err != nil {
if r.Context().Err() != nil {
d.logger.Debug("repo checkout readiness cancelled", "url", req.URL, "error", err)

if d.repoCache == nil {
http.Error(w, "repo cache not initialized", http.StatusInternalServerError)
return
}

if err := d.ensureRepoReady(r.Context(), req.WorkspaceID, req.URL); err != nil {
if r.Context().Err() != nil {
d.logger.Debug("repo checkout readiness cancelled", "url", req.URL, "error", err)
d.logger.Warn("repo checkout rejected",
"reason", "workdir_not_owned",
"task_id", activeTask.TaskID,
"error", authErr,
Comment on lines +317 to +206
http.SetCookie(w, &http.Cookie{
Name: name,
Value: "",
Path: "/",
Domain: domain,
MaxAge: -1,
Expires: time.Unix(0, 0),
HttpOnly: httpOnly,
Secure: secure,
SameSite: http.SameSiteStrictMode,
})
Comment on lines +317 to +206
http.SetCookie(w, &http.Cookie{
Name: name,
Value: "",
Path: "/",
Domain: domain,
MaxAge: -1,
Expires: time.Unix(0, 0),
HttpOnly: httpOnly,
Secure: secure,
SameSite: http.SameSiteStrictMode,
})
Comment on lines +257 to +267
http.SetCookie(w, &http.Cookie{
Name: name,
Value: value,
Path: "/",
Domain: domain,
MaxAge: int(ttl.Seconds()),
Expires: now.Add(ttl),
HttpOnly: false,
Secure: secure,
SameSite: http.SameSiteStrictMode,
})
if skill.IsLikelyBinaryFilePath(rel) {
slog.Info("local skill: skipping binary file",
"skill_dir", skillDir,
"path", filepath.ToSlash(rel),
// non-UTF-8 encoding, both of which corrupt exactly the same way.
if skill.IsLikelyBinaryFilePath(rel) {
slog.Info("local skill: skipping binary file",
"skill_dir", skillDir,
return
}
if r.Context().Err() != nil {
d.logger.Debug("repo checkout cancelled", "url", req.URL, "error", err)
Comment on lines +78 to +79
return stripMentionMarkdown(raw)
.replace(/!\[[^\]]*\]\([^)]*\)/g, imageLabel)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.