Repository navigation
Posix.Dlfcn handles are NativeUInt, not Pointer; init FPC TUI checkpoints - #227
Merged
Merged
Conversation
…ints Two fixes: LocalVector.Sqlite3.pas / onnxruntime_pas_api.pas -- the persistent dcc64 Linux E2010 at the dlsym call (third round: Pointer(h) in #224, Pointer(NativeUInt(h)) in #225, PPointer(@h)^ in #226 all drew the same "Incompatible types: 'UInt64' and 'Pointer'"). Root cause was on the other side of the call the whole time: Delphi's Posix.Dlfcn declares dlopen returning NativeUInt and dlsym taking (Handle: NativeUInt; ...) -- the RTL wraps the POSIX void* handle as an ordinal, same as HMODULE on Windows. The error was the PARAMETER rejecting our Pointer, not a failing cast. Fix: pass the TOrdHandle / TOrtLibHandle (both = NativeUInt in this branch) straight through with no cast, and drop the now-pointless cast on the dlopen result too. Comments updated to stop claiming dlopen returns a Pointer. PasClaw.TUI.pas -- Codex P2 on PR #226 (legit): the FPC line-based REPL's new /undo handler calls UndoTurns, but nothing on the FPC startup path ever called InitCheckpoints (RewireCheckpoints is Delphi-positioned-TUI-only), so the checkpoints module stayed disabled and /undo always reported "checkpoints not enabled" even with CheckpointsEnabled forwarded from config. TTUI.Run (FPC block) now initializes checkpoints once before the REPL loop, keyed on the same fixed 'fpc-tui-session' id HandleUserInput already uses for the background-subagent coordinator (the FPC REPL is single-session with no FSession). FPC make smoke + full make test green. https://claude.ai/code/session_01TBcLtmpj7dqA5tyFbGnQon
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the lingering dcc64 Linux E2010 at the
dlsymcall, plus the legit Codex P2 from #226's review.Summary
LocalVector.Sqlite3.pas+onnxruntime_pas_api.pas— Posix.Dlfcn handles are ordinals, not pointersThird round of
E2010 Incompatible types: 'UInt64' and 'Pointer'at thedlsymcall —Pointer(h)(#224),Pointer(NativeUInt(h))(#225), andPPointer(@h)^(#226) all drew the identical error. The root cause was on the other side of the call the whole time: Delphi'sPosix.DlfcndeclaresdlopenreturningNativeUIntanddlsymtaking(Handle: NativeUInt; ...)— the RTL wraps the POSIXvoid*handle as an ordinal, the same wayHMODULEworks on Windows. The E2010 was the parameter rejecting ourPointer, not a failing cast. (Evidence: the error persisted no matter which flavor ofPointerwe produced, and the neighbouringdlopenline never errored.)Fix: pass the
TOrdHandle/TOrtLibHandle(both= NativeUIntin this branch) straight through with no cast, and drop the now-pointless cast on thedlopenresult. Comments updated to stop claimingdlopenreturns aPointer.PasClaw.TUI.pas— initialize checkpoints on the FPC REPL path (Codex P2 on #226, legit)The FPC line-based REPL's
/undohandler callsUndoTurns, but nothing on the FPC startup path ever calledInitCheckpoints(RewireCheckpointsis Delphi-positioned-TUI-only), so the checkpoints module stayed disabled and/undoalways reported "checkpoints not enabled" even withCheckpointsEnabledforwarded from config.TTUI.Run(FPC block) now initializes checkpoints once before the REPL loop, keyed on the same fixed'fpc-tui-session'idHandleUserInputalready uses for the background-subagent coordinator (the FPC REPL is single-session with noFSession).Test plan
make smokeclean.make testgreen (includes checkpoints + goals-runner + TUI-adjacent suites).LocalVector.Sqlite3.pas(165)E2010 cleared; same foronnxruntime_pas_api.pas'sortDoGetProc.pasclaw tui, make an edit turn,/undorestores instead of "checkpoints not enabled".https://claude.ai/code/session_01TBcLtmpj7dqA5tyFbGnQon
Generated by Claude Code