mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-04 07:18:50 +00:00
tool calls: damaged openers of a declared parameter not set yet are read as that parameter (#6032 R2, recovery on)
Second narrow repair from PR #6032 (Matthias Nott; Gyro / Coder-L recordings), reimplemented on the current
parser for whole and streamed calls alike, and only with tool_call_recovery on (the default):
- `<parameter=NAME: value` + line break (no `>` on the line) is NAME with that value (quotes around it
dropped), then its `</parameter>`;
- where a parameter may begin (after the function opener or a value's `</parameter>`), a bare `<NAME>`, a
`</NAME>` or a `<=NAME>` is an opener of NAME when NAME is a declared parameter of the call's tool that is
not set yet; the value before it ends at its `</parameter>`;
- other text there is skipped to the next `<parameter=` in the streamed view too, as the whole read did.
A tag of a parameter already set stays text, the same forms inside a value stay byte for byte, and with
recovery off nothing changes. New: opener_at() (one opener rule for parse_tool_call, param_end and the scan);
parse_tool_call takes recover= (OutputParser passes its own).
Test: serve/test_parser_param_openers.py (6 of the PR's forms + 3 negatives, whole and in pieces of 1, 3, 7,
streamed JSON = final; recovery off). Before (198cb95c9, p2003-20261116-1838-fb11): the 6 forms fail (48
subtests), the negatives pass. After (p2003-20261116-1830-3e63): 105 passed over the parser files, test_server
tool tests 61 passed.
This commit is contained in:
1 parent
198cb95c93
commit
b3e6361c53
2 files changed
+234
-27
No files matched your search
+128
-27
@@ -817,7 +817,7 @@ def _close_verdict(after: str, final: bool) -> str:
|
||||
|
||||
|
||||
def param_end(text: str, final: bool = False, name: str | None = None, hold: bool = True,
|
||||
allow_reopen: bool = False) -> int:
|
||||
allow_reopen: bool = False, names=None) -> int:
|
||||
"""Where a parameter value in `text` ends: the first PARAM_END followed (after whitespace) by the next
|
||||
PARAM_START or FUNC_END, or by the wrapper's CALL_END when the call's `</function>` was left out (#4427) - the
|
||||
same text inside a value (a file that documents the call format, #210) is
|
||||
@@ -842,8 +842,11 @@ def param_end(text: str, final: bool = False, name: str | None = None, hold: boo
|
||||
return -2
|
||||
elif after.startswith(FOLLOWERS) or _follower_form(after): # #6032 R1: the damaged followers
|
||||
return at
|
||||
elif names and opener_at(after, names, final) not in (None, "pending"):
|
||||
return at # #6032 R2: `<NAME>` / `</NAME>` of a declared parameter not set yet
|
||||
elif not after or PARAM_START.startswith(after) or FUNC_END.startswith(after) or CALL_END.startswith(after) \
|
||||
or any(t.startswith(after) for t in FOLLOWERS) or _follower_form(after) is None:
|
||||
or any(t.startswith(after) for t in FOLLOWERS) or _follower_form(after) is None \
|
||||
or (names and opener_at(after, names, final) == "pending"):
|
||||
return at if final else -2
|
||||
at = text.find(PARAM_END, at + 1)
|
||||
return -1
|
||||
@@ -887,6 +890,54 @@ def param_name(opener: str) -> str | None:
|
||||
return name
|
||||
|
||||
|
||||
_COLON_OPENER = re.compile(r"<parameter=([^<>\s:=]+):[ \t]*([^\n<>]*)\n")
|
||||
_BARE_OPENER = re.compile(r"<(?:/|=)?([^<>\s=/]+)>")
|
||||
|
||||
|
||||
def opener_at(s: str, names=None, final: bool = False):
|
||||
"""#6032 R2: the parameter opener `s` starts with (no leading whitespace), at a point where one may begin (after
|
||||
the function opener or a value's `</parameter>`). -> (name, length, inline value): name None = read and dropped;
|
||||
inline value: the colon form's own value, the rest None. "pending": it may still become one (streaming; `final`
|
||||
decides); None: no opener here.
|
||||
`<parameter=NAME>`: the call format's own (the name as param_name reads it);
|
||||
`<parameter=NAME: value` + line break (no `>` on the line): NAME with that value, quotes around it dropped,
|
||||
then its `</parameter>` (Gyro / Coder-L, recorded);
|
||||
`<NAME>`, `</NAME>`, `<=NAME>`: an opener of NAME when NAME is in `names` (the call's declared parameters not
|
||||
set yet); any other such tag is no opener (a tag of the text, or one R1 drops)."""
|
||||
if s.startswith(PARAM_START):
|
||||
line = s.split("\n", 1)[0]
|
||||
gt = line.find(">")
|
||||
if gt >= 0:
|
||||
return param_name(s[len(PARAM_START):gt]), gt + 1, None
|
||||
m = _COLON_OPENER.match(s)
|
||||
if m:
|
||||
value = m.group(2).strip()
|
||||
if value.startswith('"'):
|
||||
value = value[1:]
|
||||
value = value[:-1] if value.endswith('"') else value
|
||||
tail = re.match(r"\s*" + re.escape(PARAM_END), s[m.end():])
|
||||
if tail is None and not final and PARAM_END.startswith(s[m.end():].lstrip()):
|
||||
return "pending"
|
||||
return param_name(m.group(1)), m.end() + (tail.end() if tail else 0), value
|
||||
if "\n" not in s:
|
||||
# the `>` still arriving, or a long name: held, except that the call's own scan reads it as before when
|
||||
# the line ends (a `<parameter=` line with neither `>` nor a colon form is no opener)
|
||||
if s.find(">") < 0 and not final:
|
||||
return "pending"
|
||||
gt = s.find(">")
|
||||
return (param_name(s[len(PARAM_START):gt]), gt + 1, None) if gt >= 0 else None
|
||||
gt = s.find(">")
|
||||
return (param_name(s[len(PARAM_START):gt]), gt + 1, None) if gt >= 0 else None
|
||||
if names:
|
||||
m = _BARE_OPENER.match(s)
|
||||
if m:
|
||||
return (m.group(1), m.end(), None) if m.group(1) in names else None
|
||||
if not final and re.fullmatch(r"<[/=]?[^<>\s=/]*", s) and any(
|
||||
n.startswith(s.lstrip("</=")) for n in names):
|
||||
return "pending"
|
||||
return None
|
||||
|
||||
|
||||
def call_end(text: str, final: bool = False, hold: bool = True) -> int:
|
||||
"""Where a tool call's body ends (#210): the `</tool_call>` after the call's own `</function>`, found by walking
|
||||
its parameters with param_end, so a value may contain either tag. -1: not complete yet. A body that is not in
|
||||
@@ -1210,7 +1261,7 @@ def coerce_value(value: str, declared, notes: list | None = None):
|
||||
return v
|
||||
|
||||
|
||||
def parse_tool_call(body: str, schema: dict | None = None, notes: list | None = None) -> ToolCall:
|
||||
def parse_tool_call(body: str, schema: dict | None = None, notes: list | None = None, recover: bool = False) -> ToolCall:
|
||||
"""`<function=NAME>\\n<parameter=P>\\nVALUE\\n</parameter>...</function>` -> ToolCall. Values are JSON-decoded
|
||||
when the tool's schema says the parameter is not a string (or, without a schema, when they parse as JSON
|
||||
objects/arrays/numbers/booleans)."""
|
||||
@@ -1221,20 +1272,37 @@ def parse_tool_call(body: str, schema: dict | None = None, notes: list | None =
|
||||
rest = body[body.index(">") + 1:]
|
||||
props = ((schema or {}).get("parameters") or {}).get("properties") or {}
|
||||
args = {}
|
||||
while "<parameter=" in rest:
|
||||
rest = rest[rest.index("<parameter=") + len("<parameter="):]
|
||||
pname = param_name(rest[:rest.index(">")]) # #6032 R1: None = read the value and drop it
|
||||
rest = rest[rest.index(">") + 1:]
|
||||
while True:
|
||||
# #6032 R2 (recover): where a parameter may begin, a damaged opener of a declared parameter not set yet
|
||||
# counts (opener_at); anything else is skipped to the next `<parameter=`, as before
|
||||
unset = {n for n in props if n not in args} if recover else None
|
||||
s = rest.lstrip()
|
||||
got = opener_at(s, unset, final=True) if (recover and not s.startswith(PARAM_START)) else None
|
||||
if got is None:
|
||||
if "<parameter=" not in rest:
|
||||
break
|
||||
rest = rest[rest.index("<parameter="):]
|
||||
if recover:
|
||||
got = opener_at(rest, unset, final=True)
|
||||
if got is None: # the old reading (a `<parameter=` with no `>` raises)
|
||||
got = (param_name(rest[len(PARAM_START):rest.index(">")]), rest.index(">") + 1, None)
|
||||
s = rest
|
||||
pname, length, inline = got
|
||||
rest = s[length:]
|
||||
declared = declared_type(props.get(pname)) if pname else None
|
||||
# #5493: a close followed by the same name again is part of a STRING value (#4078); a non-string parameter
|
||||
# written twice is two writes of it, and the later one counts
|
||||
end = param_end(rest, final=True, name=pname, allow_reopen=(declared is None or _declares(declared, "string")))
|
||||
value = rest[:end] if end >= 0 else rest
|
||||
rest = rest[end + len(PARAM_END):] if end >= 0 else ""
|
||||
if value.startswith("\n"):
|
||||
value = value[1:]
|
||||
if value.endswith("\n"):
|
||||
value = value[:-1]
|
||||
if inline is not None: # the colon form carries its value on the opener's line
|
||||
value = inline
|
||||
else:
|
||||
# #5493: a close followed by the same name again is part of a STRING value (#4078); a non-string parameter
|
||||
# written twice is two writes of it, and the later one counts
|
||||
end = param_end(rest, final=True, name=pname, allow_reopen=(declared is None or _declares(declared, "string")),
|
||||
names={n for n in props if n not in args and n != pname} if recover else None)
|
||||
value = rest[:end] if end >= 0 else rest
|
||||
rest = rest[end + len(PARAM_END):] if end >= 0 else ""
|
||||
if value.startswith("\n"):
|
||||
value = value[1:]
|
||||
if value.endswith("\n"):
|
||||
value = value[:-1]
|
||||
v = coerce_value(value, declared, notes) if pname else _SKIP
|
||||
if v is not _SKIP:
|
||||
args[pname] = v
|
||||
@@ -1555,6 +1623,8 @@ class OutputParser:
|
||||
self.sval_started = False
|
||||
self.sdeclared = {}
|
||||
self.sheld: dict = {} # #5493: the non-string parameters, sent when the call closes (a later write wins)
|
||||
self.sset: set = set() # #6032 R2: the parameters set so far (a damaged opener counts only for the others)
|
||||
self.snames = None # ... the declared ones not set yet, for the current value's end (recover only)
|
||||
self.spname = None
|
||||
self.sraw_pname = ""
|
||||
self.svstart = 0
|
||||
@@ -1648,15 +1718,44 @@ class OutputParser:
|
||||
elif self.ss == "between":
|
||||
stripped = rest.lstrip()
|
||||
self.sp += len(rest) - len(stripped)
|
||||
if stripped.startswith("<parameter="):
|
||||
b = stripped.find(">")
|
||||
if b < 0:
|
||||
got = None
|
||||
if self.recover and not stripped.startswith(FUNC_END):
|
||||
# #6032 R2: the opener parse_tool_call reads here (a damaged one of a declared parameter not set
|
||||
# yet, or the colon form); other text up to the next `<parameter=` is skipped, as there
|
||||
got = opener_at(stripped, set(self.sdeclared) - self.sset, self._final)
|
||||
if got == "pending":
|
||||
return out
|
||||
pname = param_name(stripped[11:b]) # #6032 R1: as parse_tool_call names it; None = dropped
|
||||
self.sp += b + 1
|
||||
if got is None and not stripped.startswith("<parameter="):
|
||||
k = stripped.find("<parameter=")
|
||||
if k < 0:
|
||||
return out # trailing text, or a tag still arriving: wait
|
||||
self.sp += k
|
||||
continue
|
||||
if got is not None or stripped.startswith("<parameter="):
|
||||
if got is None:
|
||||
b = stripped.find(">")
|
||||
if b < 0:
|
||||
return out
|
||||
got = (param_name(stripped[11:b]), b + 1, None) # #6032 R1: as parse_tool_call names it
|
||||
pname, length, inline = got
|
||||
self.sp += length
|
||||
self.sraw_pname = pname
|
||||
self.spname = pname
|
||||
self.snames = (set(self.sdeclared) - self.sset - {pname}) if self.recover else None
|
||||
if inline is not None: # the colon form: its value is on the opener's line
|
||||
declared = self.sdeclared.get(pname) if pname else None
|
||||
v = coerce_value(inline, declared) if pname else _SKIP
|
||||
if v is not _SKIP and declared == "string":
|
||||
args(("" if self.sfirst else ",") + json.dumps(pname) + ":" + json.dumps(v))
|
||||
self.sfirst = False
|
||||
self.sset.add(pname)
|
||||
elif v is not _SKIP:
|
||||
self.sheld.pop(pname, None)
|
||||
self.sheld[pname] = v
|
||||
self.sset.add(pname)
|
||||
continue
|
||||
if pname is not None and self.sdeclared.get(pname) == "string":
|
||||
self.sset.add(pname)
|
||||
args(("" if self.sfirst else ",") + json.dumps(pname) + ':"')
|
||||
self.sfirst = False
|
||||
self.ss, self.sval_started = "str", False
|
||||
@@ -1677,7 +1776,8 @@ class OutputParser:
|
||||
self.sval_started = True
|
||||
self.svstart = self.sp
|
||||
# the walk starts at the value (a quoted call's opener counts); only a close in the new text can end it
|
||||
end = param_end(self.buf[self.svstart:], self._final, name=self.spname, allow_reopen=True) if PARAM_END in rest else -1
|
||||
end = param_end(self.buf[self.svstart:], self._final, name=self.spname, allow_reopen=True,
|
||||
names=self.snames) if PARAM_END in rest else -1
|
||||
end = end - (self.sp - self.svstart) if end >= 0 else end
|
||||
if end >= 0:
|
||||
value = rest[:end]
|
||||
@@ -1698,7 +1798,7 @@ class OutputParser:
|
||||
elif self.ss == "raw":
|
||||
declared = self.sdeclared.get(self.sraw_pname)
|
||||
end = param_end(rest, self._final, name=self.spname, # the rule of parse_tool_call (#5493)
|
||||
allow_reopen=(declared is None or _declares(declared, "string")))
|
||||
allow_reopen=(declared is None or _declares(declared, "string")), names=self.snames)
|
||||
if end < 0:
|
||||
return out
|
||||
value = rest[:end]
|
||||
@@ -1712,6 +1812,7 @@ class OutputParser:
|
||||
# call) streams once, with the value the final call has (the later write), not as two JSON keys
|
||||
self.sheld.pop(self.sraw_pname, None)
|
||||
self.sheld[self.sraw_pname] = v
|
||||
self.sset.add(self.sraw_pname)
|
||||
self.sp += end + len(PARAM_END)
|
||||
self.ss = "between"
|
||||
else:
|
||||
@@ -1853,7 +1954,7 @@ class OutputParser:
|
||||
name = body[:end].strip()[len("<function="):].split(">", 1)[0].strip()
|
||||
name = self.aliases.get(name, name)
|
||||
if self._callable(name):
|
||||
call = parse_tool_call(body[:end], self.schemas.get(name), self.notes)
|
||||
call = parse_tool_call(body[:end], self.schemas.get(name), self.notes, recover=self.recover)
|
||||
call.name = name
|
||||
except ValueError:
|
||||
pass
|
||||
@@ -2148,7 +2249,7 @@ class OutputParser:
|
||||
name = self.aliases.get(name, name)
|
||||
if f >= 0 and not body[f:].strip() and self._callable(name):
|
||||
try:
|
||||
call = parse_tool_call(body[:f], self.schemas.get(name), self.notes)
|
||||
call = parse_tool_call(body[:f], self.schemas.get(name), self.notes, recover=self.recover)
|
||||
call.name = name
|
||||
self.pending.append([self.buf, call])
|
||||
self.buf, self.state = "", "reasoning"
|
||||
@@ -2171,7 +2272,7 @@ class OutputParser:
|
||||
out += self._close_scan()
|
||||
call = self.scall
|
||||
try: # the final event carries the call's arguments, as the one _finish_call sends does
|
||||
call = parse_tool_call(self.buf, self.schemas.get(call.name), self.notes)
|
||||
call = parse_tool_call(self.buf, self.schemas.get(call.name), self.notes, recover=self.recover)
|
||||
call.name, call.id = self.scall.name, self.scall.id
|
||||
except ValueError:
|
||||
pass
|
||||
@@ -2201,7 +2302,7 @@ class OutputParser:
|
||||
try:
|
||||
if raw_name != raw_name.strip() and name not in self.schemas:
|
||||
raise ValueError("whitespace tool name is not declared")
|
||||
call = parse_tool_call(body, self.schemas.get(name), self.notes)
|
||||
call = parse_tool_call(body, self.schemas.get(name), self.notes, recover=self.recover)
|
||||
call.name = name
|
||||
except ValueError:
|
||||
if not self.recover:
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
"""serve/test_parser_param_openers.py - #6032 R2 (recovery on): damaged parameter openers of a declared parameter not
|
||||
set yet - `<parameter=NAME: value`, a bare `<NAME>` / `</NAME>`, `<=NAME>` - read as that parameter (cases from PR #6032's
|
||||
test_parser_damaged_param_openers.py, test_parser_bare_param_opener.py and test_parser_followers.py, Gyro / Coder-L
|
||||
recordings), with negatives: the same tags inside a value stay byte for byte, a tag of a parameter already set stays
|
||||
text, and with recovery off nothing changes.
|
||||
|
||||
python -m pytest serve/test_parser_param_openers.py -q
|
||||
|
||||
Every case whole and in pieces of 1, 3 and 7 bytes, with the arguments streamed and not; the streamed JSON of a call
|
||||
is its final arguments.
|
||||
"""
|
||||
import json
|
||||
import sys
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
||||
from serve.frontend import OutputParser # noqa: E402
|
||||
|
||||
TOOLS = [
|
||||
{"name": "Grep", "parameters": {"properties": {
|
||||
"pattern": {"type": "string"}, "path": {"type": "string"}, "output_mode": {"type": "string"},
|
||||
"-n": {"type": "boolean"}, "head_limit": {"type": "integer"}, "context": {"type": "number"}}}},
|
||||
{"name": "Read", "parameters": {"properties": {
|
||||
"file_path": {"type": "string"}, "offset": {"type": "integer"}, "limit": {"type": "integer"}}}},
|
||||
{"name": "Bash", "parameters": {"properties": {"command": {"type": "string"}, "timeout": {"type": "number"}}}},
|
||||
{"name": "Write", "parameters": {"properties": {"file_path": {"type": "string"}, "content": {"type": "string"}}}},
|
||||
]
|
||||
REST = ("<parameter=path>\nsrc/router/limits.ts\n</parameter>\n<parameter=output_mode>\ncontent\n</parameter>\n"
|
||||
"<parameter=-n>\ntrue\n</parameter>\n</function>\n</tool_call>")
|
||||
CASES = {
|
||||
"colon_value_quoted": (
|
||||
"<tool_call>\n<function=Grep>\n<parameter=pattern: \"const sh|function sh|import.*sh\"\n</parameter>\n" + REST,
|
||||
("Grep", {"pattern": "const sh|function sh|import.*sh", "path": "src/router/limits.ts", "output_mode": "content",
|
||||
"-n": True})),
|
||||
"colon_value_quote_left_open": (
|
||||
"<tool_call>\n<function=Grep>\n<parameter=pattern: \"const sh|async function sh\n</parameter>\n" + REST,
|
||||
("Grep", {"pattern": "const sh|async function sh", "path": "src/router/limits.ts", "output_mode": "content",
|
||||
"-n": True})),
|
||||
"bare_opener_after_a_closer": (
|
||||
"<tool_call>\n<function=Grep>\n<parameter=pattern>\nfoo\n</parameter>\n"
|
||||
"<parameter=output_mode>\ncontent\n</parameter>\n<head_limit>\n10\n</parameter>\n</function>\n</tool_call>",
|
||||
("Grep", {"pattern": "foo", "output_mode": "content", "head_limit": 10})),
|
||||
"closing_tag_of_a_declared_parameter_opens_it": (
|
||||
"<tool_call>\n<function=Grep>\n<parameter=pattern>\nfoo\n</parameter>\n<parameter=-n>\ntrue\n</parameter>\n"
|
||||
"</context>\n2\n</parameter>\n</function>\n</tool_call>",
|
||||
("Grep", {"pattern": "foo", "-n": True, "context": 2})),
|
||||
"damaged_opener_of_a_declared_parameter": (
|
||||
"<tool_call>\n<function=Read>\n<parameter=file_path>\n/d/f\n</parameter>\n<=offset>\n5\n</parameter>\n"
|
||||
"</function>\n</tool_call>",
|
||||
("Read", {"file_path": "/d/f", "offset": 5})),
|
||||
"bare_timeout": (
|
||||
"<tool_call>\n<function=Bash>\n<parameter=command>\nls\n</parameter>\n<timeout>\n300\n</parameter>\n"
|
||||
"</function>\n</tool_call>",
|
||||
("Bash", {"command": "ls", "timeout": 300})),
|
||||
# negatives
|
||||
"a_tag_of_a_parameter_already_set_stays": (
|
||||
"<tool_call>\n<function=Bash>\n<parameter=command>\nls\n</parameter>\n</command>\nx\n</parameter>\n"
|
||||
"</function>\n</tool_call>",
|
||||
("Bash", {"command": "ls\n</parameter>\n</command>\nx"})),
|
||||
"the_forms_inside_a_value_stay": (
|
||||
"<tool_call>\n<function=Write>\n<parameter=file_path>\na.txt\n</parameter>\n<parameter=content>\n"
|
||||
"a\n<parameter=x: y\n<function=z>\n<file_path>\n</content>\n<parameter=nope>\n<parameter=file_path: q\nend\n"
|
||||
"</parameter>\n</function>\n</tool_call>",
|
||||
("Write", {"file_path": "a.txt", "content": "a\n<parameter=x: y\n<function=z>\n<file_path>\n</content>\n"
|
||||
"<parameter=nope>\n<parameter=file_path: q\nend"})),
|
||||
"html_with_declared_names_stays": (
|
||||
"<tool_call>\n<function=Write>\n<parameter=file_path>\na.html\n</parameter>\n<parameter=content>\n"
|
||||
"<html>\n<pattern>\nx\n</pattern>\n<div>\n</html>\n</parameter>\n</function>\n</tool_call>",
|
||||
("Write", {"file_path": "a.html", "content": "<html>\n<pattern>\nx\n</pattern>\n<div>\n</html>"})),
|
||||
}
|
||||
|
||||
|
||||
def run(text, stream, step, recover=True):
|
||||
p = OutputParser(thinking=False, tools=TOOLS, stream_tools=stream, recover=recover)
|
||||
evs = []
|
||||
for k in range(0, len(text), step):
|
||||
evs += p.feed(text[k:k + step])
|
||||
return evs + p.finish()
|
||||
|
||||
|
||||
class ParamOpeners(unittest.TestCase):
|
||||
def test_cases(self):
|
||||
for label, (text, want) in CASES.items():
|
||||
for stream in (False, True):
|
||||
for step in (1, 3, 7, len(text)):
|
||||
with self.subTest(label, stream=stream, step=step):
|
||||
evs = run(text, stream, step)
|
||||
self.assertEqual([(e.call.name, e.call.arguments) for e in evs if e.kind == "tool_call"], [want])
|
||||
if stream:
|
||||
streamed = "".join(e.text for e in evs if e.kind == "tool_args")
|
||||
self.assertEqual(json.loads(streamed), want[1], streamed)
|
||||
|
||||
def test_recovery_off_reads_no_damaged_opener(self):
|
||||
for label, key in (("bare_opener_after_a_closer", "head_limit"), ("bare_timeout", "timeout"),
|
||||
("damaged_opener_of_a_declared_parameter", "offset")):
|
||||
text = CASES[label][0]
|
||||
for stream in (False, True):
|
||||
with self.subTest(label, stream=stream):
|
||||
calls = [e.call for e in run(text, stream, len(text), recover=False) if e.kind == "tool_call"]
|
||||
for call in calls:
|
||||
self.assertNotIn(key, call.arguments)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user