Skip to content

OpenClaw: add and refine ST knowledge-base and learning/review skills#4643

Merged
winlinvip merged 45 commits intoossrs:developfrom
winlinvip:develop
Mar 5, 2026
Merged

OpenClaw: add and refine ST knowledge-base and learning/review skills#4643
winlinvip merged 45 commits intoossrs:developfrom
winlinvip:develop

Conversation

@winlinvip
Copy link
Member

  • Add a comprehensive ST knowledge base document:
  • openclaw/memory/srs-coroutines.md
  • Add ST-focused developer skill:
  • openclaw/skills/st-develop/SKILL.md
  • openclaw/skills/st-develop/scripts/verify.sh
  • Add KB workflow skills that support ST documentation quality and learning:
  • openclaw/skills/kb-review/SKILL.md
  • openclaw/skills/srs-learn/SKILL.md
  • Update openclaw/skills/srs-support/SKILL.md to use dynamic SRS_ROOT path resolution, improving portability for KB/source
    loading.

…, key constraints, signal handling, license (MPL 1.1/GPLv2), GDB tools, unit tests, Cygwin64 distinction, and timeout semantics
…from SRS 3rdparty, replace SRS-specific types/macros with standard C++.
…s-coroutines.md

- Add missing Linux + i386 to platform support list
- Rewrite jmpbuf paragraph as historical/resolved (ST now uses own _st_jmp_buf_t)
- Document MIPS32 JB_ defines mismatch and md.h long[13] vs actual 12 entries
- Consolidate porting steps 2-4 into single step, note jmpbuf.c now optional
- Fix ARM instructions: str/ldr -> stmia/ldmia, add stp/ldp for AArch64
- Renumber porting steps from 9 to 7
winlinvip and others added 11 commits February 20, 2026 11:01
- Fix misleading examples in srs-coroutines.md Timeout Semantics section
- Old doc claimed stale last_clock causes shorter waits (at most 2ms)
- Actually, dispatch computes epoll timeout from same stale last_clock,
  so staleness cancels out and epoll_wait gets full timeout value
- Added cancelling effect explanation with quiet/busy server examples
- New kb-review skill for reviewing KB docs against source code
…section

- Step 1: fix epoll_ctl description (ADD/MOD depends on existing watchers, events from ref counts)
- Phase 3: fix error bit description to include EPOLLPRI via _ST_EPOLL_EVENTS()
- Phase 4: clarify pollset_del skips fired fds (REVENTS!=0), deferred to Phase 5
- Add _ST_EPOLL_EXCEP_CNT throughout (was omitted from ref counting descriptions)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add top-level cmake/CMakeLists.txt to build both SRS (trunk/cmake) and ST (trunk/3rdparty/st-srs/cmake) in one workspace.

- Move ST CMake entry to trunk/3rdparty/st-srs/cmake/CMakeLists.txt and ignore /cmake/build outputs.

- Add st_utest_context.cpp with context-switch coverage: separate coroutine stack, local state across yield, deterministic yield ordering, and join return value propagation.

- Update skills/st-develop docs + verify.sh to use unified CMake flow and run st_utest from unified build output.

- Update VSCode launch/tasks/settings paths and targets to the new /cmake/build layout.
@winlinvip winlinvip requested review from Copilot and xiaozhihong March 5, 2026 11:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@winlinvip winlinvip force-pushed the develop branch 5 times, most recently from 9d3b304 to 7ac52ca Compare March 5, 2026 13:33
@winlinvip
Copy link
Member Author

@codex

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7ac52cadf6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +52 to +53
static __thread _st_destructor_t _st_destructors[ST_KEYS_MAX];
static __thread int key_max = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

P1 Badge Keep ST key registry process-wide

Making _st_destructors and key_max thread-local changes st_key_create semantics from process-wide keys to per-OS-thread keys, so a key created in one thread is invalid (EINVAL) in another thread whose local key_max is still 0. This contradicts ST’s documented contract in docs/reference.html (st_key_create() keys are usable by all threads in a process) and can break SRS paths that store a global key once and then access it from other threads (for example _srs_context_key in srs_protocol_log.cpp), causing thread-specific state to disappear outside the creating thread.

Useful? React with 👍 / 👎.

"label": "build",
"type": "shell",
"command": "cmake --build ${workspaceFolder}/trunk/cmake/build",
"command": "${workspaceFolder}/cmake/build && cmake --build . --target srs utest",
Copy link
Contributor

Choose a reason for hiding this comment

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

P2 Badge Fix build task to change into cmake/build

The build task command starts with ${workspaceFolder}/cmake/build && ... instead of cd ${workspaceFolder}/cmake/build && ..., so the shell attempts to execute the directory path as a command and fails immediately (Is a directory/No such file or directory). This makes the default VS Code build task unusable for developers.

Useful? React with 👍 / 👎.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

winlinvip and others added 2 commits March 5, 2026 08:51
Add .agents/skills as a symlink to ../openclaw/skills so agent tooling discovers the shared local skill definitions.

Co-authored-by: Codex <noreply@openai.com>
The build task was trying to execute the cmake/build directory as a
binary instead of changing into it first.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
@winlinvip
Copy link
Member Author

Update by codex again.

@winlinvip winlinvip merged commit 0243429 into ossrs:develop Mar 5, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants