Skip to content

Create LICENSE#3

Closed
Soulter wants to merge 1 commit into
masterfrom
add-license-1
Closed

Create LICENSE#3
Soulter wants to merge 1 commit into
masterfrom
add-license-1

Conversation

@Soulter
Copy link
Copy Markdown
Member

@Soulter Soulter commented Dec 11, 2022

No description provided.

@Soulter Soulter closed this Dec 11, 2022
@Soulter Soulter deleted the add-license-1 branch December 23, 2023 11:04
HePudding added a commit to HePudding/AstrBot that referenced this pull request Apr 29, 2026
- 父帖上下文改为追加到 message_str 尾部,避免破坏 wake_prefix /
  星标命令 startswith 匹配(Codex P1)。LLM 主路径直接从 message_str
  读完整 prompt(astr_main_agent.py:1174 / third_party.py:315),尾部
  追加不影响 LLM;chain 里的死代码 Comp.Plain(parent_ctx) 一并移除。
- get_note 显式重抛 asyncio.CancelledError,避免吞掉取消信号导致
  shutdown / 超时挂起(Sourcery AstrBotDevs#3)。普通 HTTP 异常仍降级到 debug。
- reply-with-quote 仅有 renoteId 时也通过 API 拉取引用帖(Sourcery AstrBotDevs#2
  / Codex P2)。抽出 _resolve_reply_target / _resolve_renote_target
  两个纯解析方法,_resolve_parent_note 现在是它们的组合并删掉了未使用
  的 depth 形参(Sourcery AstrBotDevs#1)。
- _build_parent_note_context 对无 reply/replyId/renote/renoteId 的
  独立帖子早返回,避免空循环(Sourcery 反馈 c)。
- 新增 scripts/smoke_misskey_parent_ctx.py:11 个回归用例。
yzhouwang added a commit to yzhouwang/AstrBot that referenced this pull request May 4, 2026
…y runner

Patch AstrBotDevs#2 added fail_closed=True semantics to the 6 LLM filter decorators
and a HookAbortError catch in agent_sub_stages/internal.py. But two other
sites still let the abort fall through their broad `except Exception`:

  - astr_agent_run_util.py:303 — the local agent runner's main loop. The
    broad catch built `Error occurred during AI execution. Error Type:
    HookAbortError. Error Message: ...` and called on_agent_done with that
    string as the LLMResponse, which (a) leaked the hook name + plugin
    path + reason to the user, and (b) re-fired the on_llm_response hook
    chain — the same chain that had just aborted — causing a cascade.

  - third_party.py:82 — same pattern in the third-party agent runner.
    Yields the error string to the user via the response chain.

Fix: add a dedicated `except HookAbortError` ahead of the broad catch in
both sites. On abort:
  - log the hook / plugin / handler / reason at error level (operator-
    facing only — never user-facing)
  - do NOT call on_agent_done (avoid the cascade)
  - send the persona's custom_error_message as a polite refusal if set;
    otherwise stay silent
  - in run_agent: stop the event so the respond stage doesn't wrap and
    forward an empty result

This is the third in the SuperX governance hook safety suite (Patches
AstrBotDevs#1=signature, AstrBotDevs#2=fail_closed, AstrBotDevs#3=silent-abort).

Existing test_hook_fail_closed.py still passes (9/9). Worth adding a
test for the run_agent path in a follow-up — the current suite covers
context_utils.call_event_hook directly but not the runner's outer catch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
irmia2026 added a commit to irmia2026/AstrBot that referenced this pull request May 25, 2026
…en needed

Addresses bot review feedback on PR AstrBotDevs#8323:
- Add _needs_bridge() helper to activate temp file bridge only on
  Windows + non-ASCII paths (Sourcery AstrBotDevs#5)
- _read_index: re-raise RuntimeError when bridging not needed,
  preventing silent swallowing of genuine Faiss errors (Sourcery AstrBotDevs#1)
- _write_index: skip temp file for ASCII/non-Windows paths (Sourcery AstrBotDevs#5)
- search(): validate ndim==1 and dimension before reshape,
  preventing silent semantic corruption on 2D input (Sourcery AstrBotDevs#3, AstrBotDevs#4)
- _safe_temp_dir & _make_temp_file: simplify (Sourcery AstrBotDevs#6, AstrBotDevs#7)
  - Remove redundant CWD fallback (never reached on non-ASCII paths)
  - Remove redundant UUID prefix (mkstemp O_EXCL guarantees uniqueness)

All changes tested: 119/119 pass covering bridge logic,
ASCII/non-ASCII paths, concurrent temp file uniqueness,
search validation, and exception propagation.
irmia2026 added a commit to irmia2026/AstrBot that referenced this pull request May 25, 2026
…en needed

Addresses bot review feedback on PR AstrBotDevs#8323:
- Add _needs_bridge() helper to activate temp file bridge only on
  Windows + non-ASCII paths (Sourcery AstrBotDevs#5)
- _read_index: re-raise RuntimeError when bridging not needed,
  preventing silent swallowing of genuine Faiss errors (Sourcery AstrBotDevs#1)
- _write_index: skip temp file for ASCII/non-Windows paths (Sourcery AstrBotDevs#5)
- search(): validate ndim==1 and dimension before reshape,
  preventing silent semantic corruption on 2D input (Sourcery AstrBotDevs#3, AstrBotDevs#4)
- _safe_temp_dir & _make_temp_file: simplify (Sourcery AstrBotDevs#6, AstrBotDevs#7)
  - Remove redundant CWD fallback (never reached on non-ASCII paths)
  - Remove redundant UUID prefix (mkstemp O_EXCL guarantees uniqueness)

All changes tested: 119/119 pass covering bridge logic,
ASCII/non-ASCII paths, concurrent temp file uniqueness,
search validation, and exception propagation.
irmia2026 added a commit to irmia2026/AstrBot that referenced this pull request May 25, 2026
…en needed

Addresses bot review feedback on PR AstrBotDevs#8323:
- Add _needs_bridge() helper to activate temp file bridge only on
  Windows + non-ASCII paths (Sourcery AstrBotDevs#5)
- _read_index: re-raise RuntimeError when bridging not needed,
  preventing silent swallowing of genuine Faiss errors (Sourcery AstrBotDevs#1)
- _write_index: skip temp file for ASCII/non-Windows paths (Sourcery AstrBotDevs#5)
- search(): validate ndim==1 and dimension before reshape,
  preventing silent semantic corruption on 2D input (Sourcery AstrBotDevs#3, AstrBotDevs#4)
- _safe_temp_dir & _make_temp_file: simplify (Sourcery AstrBotDevs#6, AstrBotDevs#7)
  - Remove redundant CWD fallback (never reached on non-ASCII paths)
  - Remove redundant UUID prefix (mkstemp O_EXCL guarantees uniqueness)

All changes tested: 119/119 pass covering bridge logic,
ASCII/non-ASCII paths, concurrent temp file uniqueness,
search validation, and exception propagation.
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.

1 participant