Skip to content

Cmd.Agent: paren-star a comment with literal braces; Updater: skip SysUtils.GetLastOSError - #231

Merged
FMXExpress merged 1 commit into
mainfrom
claude/dcc64-windows-comment-brace-and-updater
Jun 11, 2026
Merged

FMXExpress merged 1 commit into
mainfrom
claude/dcc64-windows-comment-brace-and-updater

Conversation

@FMXExpress

Copy link
Copy Markdown
Owner

Two dcc64 Windows errors from PR #230 / #229.

Summary

PasClaw.Cmd.Agent.pas(209-211) E2029/E2066/E2014/E2038

The curly-brace comment I added on PR #230 in front of RegisterSendMessageTool contained a literal {name,kind,target} JSON shape inside an outer {...} comment. Pascal {...} comments don't nest, so the first inner } (after target) closed the comment — and dcc64 then parsed the trailing ]) as code, producing the cascade of errors. FPC's lexer was more forgiving and the FPC build was clean.

Switched the comment to paren-star delimiters and reworded around the literal JSON example. (Same fix pattern I used for the LocalVector.Sqlite3.pas comment that contained a literal {$ELSE} token a few PRs back — Delphi's lexer is strict here, FPC's isn't.)

PasClaw.Updater.pas(71) E2003 GetLastOSError undeclared (on Windows now too)

The LastOSErrno helper from PR #229 fell back to System.SysUtils.GetLastOSError for the non-POSIX branch. That works on FPC, but dcc64 has now refused it on both Delphi targets we've hit — Linux first (the original report), and now Windows.

Rather than keep chasing what SysUtils exports per-version, the helper now goes straight to the platform primitive:

Target Call
FPC (any) GetLastOSError
dcc64 Windows Winapi.GetLastError
dcc64 POSIX Posix.errno

Added Winapi.Windows to the Delphi-Windows uses gate alongside the existing Posix.* gate.

Test plan

  • FPC make smoke clean.
  • Full make test green.
  • dcc64 Windows: lines 209-211 of Cmd.Agent.pas and line 71 of Updater.pas should both clear.
  • dcc64 Linux: Updater.pas line 71 still resolves (Posix.Errno branch unchanged).

https://claude.ai/code/session_01TBcLtmpj7dqA5tyFbGnQon


Generated by Claude Code

… primitive directly

Two dcc64 Windows errors:

1. PasClaw.Cmd.Agent.pas(209-211): E2029/E2066/E2014/E2038. The
   curly-brace comment introducing RegisterSendMessageTool contained
   the JSON shape `{name,kind,target}` literally. Pascal `{...}`
   comments don't nest, so the first `}` inside the comment closed
   it -- dcc64 then parsed `])` as code. FPC tolerated it (its lexer
   is more forgiving about brace pairing inside comments) but Delphi
   strictly closes on the first `}`. Switched the comment to paren-
   star delimiters and reworded around the JSON example.

2. PasClaw.Updater.pas(71): E2003 Undeclared identifier
   GetLastOSError. The PR #229 helper assumed System.SysUtils.
   GetLastOSError would resolve on every Delphi target; in practice
   dcc64 has refused it on both the platforms we've hit -- Linux
   (the original report) and now Windows. Rather than keep chasing
   per-version SysUtils contents, the helper now calls the
   per-platform primitive directly: Winapi.GetLastError on dcc64
   Windows, Posix.errno on dcc64 POSIX, GetLastOSError only on FPC.
   Added Winapi.Windows to the Delphi-Windows uses gate alongside
   the existing Posix.* gate.

FPC make smoke + full make test green.

https://claude.ai/code/session_01TBcLtmpj7dqA5tyFbGnQon
@FMXExpress
FMXExpress merged commit 686ce12 into main Jun 11, 2026
FMXExpress pushed a commit that referenced this pull request Jun 13, 2026
Both changelog files were stuck at the 2026-06-10 TUI / background-
subagent / session_search / tool-RPC entries. ~7 weeks of merged
PRs (#214 through #244) had landed without a corresponding entry in
either file -- the git log was the only record of features like the
knowledgebase, inbound MCP server mode, checkpoints + /undo,
heartbeat daemon, shell backends (local | docker), send_message,
promptware defense, Windows shell-output encoding fixes, fs_grep
ripgrep optimisations, OpenTelemetry traces, and `pasclaw agent
--quiet`.

Added (newest first):

  2026-06-13
    #244  agent --quiet log-level clamp

  2026-06-12
    #243  dcc64 search path + agent --quiet / -q
    #242  OpenTelemetry traces (OTLP/HTTP+JSON)
    #241  fs_grep tier 5+6 (byte walker + Boyer-Moore-Horspool)
    #240  fs_grep tier 1-4 (deferred hash + skip-dirs + binary
          sniff + size cap)

  2026-06-11
    #239  Windows shell output: auto-detect UTF-8 vs OEM
    #238  Hashline fs_read header mojibake fix (¶ vs ¶)
    #237  Windows shell output: OEM codepage decode

  2026-06-10
    #233  Shell backends (local | docker via IShellBackend)
    #232  Heartbeat daemon + reversible condensation (CCR)
    #230  send_message tool + condenser families + promptware
          defense + task-aware MEMORY.md slicing

  2026-06-09
    #223  /goal Ralph loop + judge model + JSON-aware condenser
    #222  /undo wired into agent + sample dprojs
    #221  Checkpoints (auto-snapshot + TUI /undo)
    #220  mcp catalog: lenient hub projector
    #219  mcp: SSE / Streamable HTTP / stdio hub transports
    #218  Inbound MCP server mode
    #217  onboard: offer to index docs into the knowledgebase
    #214  Knowledgebase (RAG over operator-curated docs)

Skipped from this changelog (build-system / Delphi-fix / FPC-fix
PRs visible in the git log but not user-facing features):
#215, #216, #224, #225, #226, #227, #228, #229, #231, #234, #236.

Both files (README.md and docs/changelog.md) updated with the same
entries -- intentional mirror so a reader on either surface sees
the same history. Same prose in both; same footnote refs at the
bottom.

Validated: every [#N] reference in both files has a matching [#N]:
URL footnote (no broken links).
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.

2 participants