@rt-tools/agent-kit 0.29.1 → 0.29.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/checks/check-spec-coverage.mjs +1 -1
- package/assets/checks/rt-kit-checks.config.mjs +7 -0
- package/assets/checks/specs-for.mjs +1 -1
- package/assets/hooks/git-guard-delivery-tree.sh +63 -16
- package/assets/hooks/git-guard-delivery.sh +10 -10
- package/assets/hooks/git-guard-no-verify.sh +142 -0
- package/assets/hooks/git-guard-push-tests.sh +8 -0
- package/assets/patterns/git-workflow-commit.github.md +4 -0
- package/assets/patterns/task-flow-start.md +9 -9
- package/assets/patterns/testing-e2e.md +11 -0
- package/assets/rules/doc-style.md +1 -1
- package/assets/rules/spec-driven.md +3 -1
- package/package.json +1 -1
- package/rt-tools-agent-kit-0.29.3.tgz +0 -0
- package/rt-tools-agent-kit-0.29.1.tgz +0 -0
|
@@ -29,7 +29,7 @@ const CHECKS = CONFIG.layout?.checks ?? 'tools';
|
|
|
29
29
|
/** The name of the entry as it lies in the tree. */
|
|
30
30
|
const ENTRY = join(ROOT, CHECKS, 'specs-for.mjs');
|
|
31
31
|
|
|
32
|
-
if (!Array.isArray(CONFIG.
|
|
32
|
+
if (!Array.isArray(CONFIG.packageDirs) || CONFIG.packageDirs.length === 0) {
|
|
33
33
|
console.log('check-spec-coverage: the tree declares no directories of package sources — there is nothing to judge');
|
|
34
34
|
process.exit(0);
|
|
35
35
|
}
|
|
@@ -67,6 +67,13 @@ const DEFAULTS = {
|
|
|
67
67
|
* itself; only the source is entered here. Empty — the tree keeps no portable texts.
|
|
68
68
|
*/
|
|
69
69
|
portableDirs: [],
|
|
70
|
+
/**
|
|
71
|
+
* Directories where the sources of the package itself lie: the files it carries to other trees.
|
|
72
|
+
* The specs entry and the coverage check judge them, and nothing else. A portable text is not
|
|
73
|
+
* the same thing: a consumer tree keeps texts with foreign addresses that leave by no package,
|
|
74
|
+
* and read as package sources they would each ask for a spec. Empty — the tree writes no package.
|
|
75
|
+
*/
|
|
76
|
+
packageDirs: [],
|
|
70
77
|
/**
|
|
71
78
|
* The signs of reuse: which bundles the tree takes and where its own lie.
|
|
72
79
|
*
|
|
@@ -16,7 +16,13 @@
|
|
|
16
16
|
# did not differ from the session's tree — everything goes as before. A tree with no profile of its own is not judged at all: a foreign tree is not accountable
|
|
17
17
|
# to this guard, and a refusal on a lawful name has no bypass.
|
|
18
18
|
#
|
|
19
|
-
#
|
|
19
|
+
# The task itself is asked of the same tree. A branch created in another repository carries the
|
|
20
|
+
# number of a task of that repository; asked of the session's work queue, the number pointed to a
|
|
21
|
+
# task that does not exist or to a foreign one. A second copy of the same repository is not another
|
|
22
|
+
# tree: the shared `.git` directory is one, so the work queue and the profile are one too.
|
|
23
|
+
#
|
|
24
|
+
# FAIL-OPEN: no move in the command, no profile in the tree it moves to — neither the form nor the
|
|
25
|
+
# task is judged.
|
|
20
26
|
|
|
21
27
|
# Where the command runs, if it says so itself — the move at the start of the call. Prints the tree
|
|
22
28
|
# root or stays silent.
|
|
@@ -29,22 +35,63 @@ rt_delivery_exec_dir() {
|
|
|
29
35
|
git -C "$named" rev-parse --show-toplevel 2>/dev/null
|
|
30
36
|
}
|
|
31
37
|
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
# The root of the tree of execution when it is another repository, or silence. Another repository
|
|
39
|
+
# is told by its shared `.git` directory, not by its root: a second copy of the same repository has
|
|
40
|
+
# a root of its own and the same work queue.
|
|
41
|
+
rt_delivery_foreign_root() {
|
|
36
42
|
other="$(rt_delivery_exec_dir)"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
[ -n "$other" ] || return 0
|
|
44
|
+
mine="$(git -C "$root" rev-parse --path-format=absolute --git-common-dir 2>/dev/null)"
|
|
45
|
+
theirs="$(git -C "$other" rev-parse --path-format=absolute --git-common-dir 2>/dev/null)"
|
|
46
|
+
[ -n "$theirs" ] && [ "$mine" != "$theirs" ] && printf '%s' "$other"
|
|
47
|
+
return 0
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
# Runs one profile function in the tree of execution, with that tree's profile loaded over the
|
|
51
|
+
# package default. A tree with no profile of its own, or a profile without the function, answers
|
|
52
|
+
# with success and no output: a foreign tree is not accountable to this guard.
|
|
53
|
+
rt_delivery_in_tree() {
|
|
54
|
+
tree="$1"; shift
|
|
55
|
+
[ -f "$tree/.claude/rt-kit/project.sh" ] || return 0
|
|
56
|
+
(
|
|
57
|
+
cd "$tree" 2>/dev/null || exit 0
|
|
58
|
+
# The session profile is loaded in this shell already: without the reset its function
|
|
59
|
+
# would answer for a foreign tree that never declared one.
|
|
60
|
+
unset -f "$1" 2>/dev/null
|
|
61
|
+
for profile in "$tree/.claude/rt-kit/defaults/project.sh" "$tree/.claude/rt-kit/project.sh"; do
|
|
62
|
+
# shellcheck disable=SC1090
|
|
63
|
+
[ -f "$profile" ] && . "$profile" 2>/dev/null
|
|
64
|
+
done
|
|
65
|
+
command -v "$1" >/dev/null 2>&1 || exit 0
|
|
66
|
+
"$@"
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
# Is the branch name lawful. The tree of execution answers; where it is the session's own
|
|
71
|
+
# repository, or says nothing of itself, the answer comes from the profile already loaded.
|
|
72
|
+
rt_delivery_branch_form_ok() {
|
|
73
|
+
other="$(rt_delivery_foreign_root)"
|
|
74
|
+
if [ -n "$other" ]; then
|
|
75
|
+
rt_delivery_in_tree "$other" rt_task_branch_ok "$1"
|
|
47
76
|
return $?
|
|
48
77
|
fi
|
|
49
|
-
rt_task_branch_ok "$
|
|
78
|
+
rt_task_branch_ok "$1"
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
# The state of the task, from the work queue of the tree of execution. The session's own repository
|
|
82
|
+
# answers by the profile already loaded, from the session root — as before.
|
|
83
|
+
rt_delivery_task_state() {
|
|
84
|
+
other="$(rt_delivery_foreign_root)"
|
|
85
|
+
if [ -n "$other" ]; then
|
|
86
|
+
rt_delivery_in_tree "$other" rt_task_state "$1"
|
|
87
|
+
return $?
|
|
88
|
+
fi
|
|
89
|
+
command -v rt_task_state >/dev/null 2>&1 || return 0
|
|
90
|
+
(cd "$root" && rt_task_state "$1")
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
# The branch the command works on: of the tree of execution when it is another repository.
|
|
94
|
+
rt_delivery_current_branch() {
|
|
95
|
+
other="$(rt_delivery_foreign_root)"
|
|
96
|
+
git -C "${other:-.}" branch --show-current 2>/dev/null
|
|
50
97
|
}
|
|
@@ -181,18 +181,18 @@ fault() {
|
|
|
181
181
|
# shellcheck disable=SC1090
|
|
182
182
|
[ -f "$rt_hooks_dir/git-guard-delivery-epic.sh" ] && . "$rt_hooks_dir/git-guard-delivery-epic.sh" 2>/dev/null
|
|
183
183
|
|
|
184
|
+
# Another repository the command runs in answers for the name form, the task and the branch.
|
|
185
|
+
# shellcheck disable=SC1090
|
|
186
|
+
[ -f "$rt_hooks_dir/git-guard-delivery-tree.sh" ] && . "$rt_hooks_dir/git-guard-delivery-tree.sh" 2>/dev/null
|
|
187
|
+
command -v rt_delivery_branch_form_ok >/dev/null 2>&1 || rt_delivery_branch_form_ok() { rt_task_branch_ok "$1"; }
|
|
188
|
+
command -v rt_delivery_task_state >/dev/null 2>&1 || rt_delivery_task_state() { (cd "$root" && rt_task_state "$1"); }
|
|
189
|
+
command -v rt_delivery_current_branch >/dev/null 2>&1 || rt_delivery_current_branch() { git branch --show-current 2>/dev/null; }
|
|
190
|
+
|
|
184
191
|
# A conflicting PR of one's own: the same technique as with the folder and the signature. The helper
|
|
185
192
|
# is called before all the tiers below and judges not the readiness of this work but the right to
|
|
186
193
|
# take the next one: while what was handed over conflicts, it is fixed by the first action of the
|
|
187
194
|
# turn. No helper — the tier is not judged, and the work goes on.
|
|
188
195
|
# shellcheck disable=SC1090
|
|
189
|
-
# The tree the command runs in: the form of a branch name is judged by its profile, not by the
|
|
190
|
-
# profile of the tree the session was started from. No helper — the form is judged as before.
|
|
191
|
-
# shellcheck disable=SC1090
|
|
192
|
-
[ -f "$rt_hooks_dir/git-guard-delivery-tree.sh" ] && . "$rt_hooks_dir/git-guard-delivery-tree.sh" 2>/dev/null
|
|
193
|
-
command -v rt_delivery_branch_form_ok >/dev/null 2>&1 \
|
|
194
|
-
|| rt_delivery_branch_form_ok() { rt_task_branch_ok "$1"; }
|
|
195
|
-
|
|
196
196
|
[ -f "$rt_hooks_dir/git-guard-delivery-conflict.sh" ] && . "$rt_hooks_dir/git-guard-delivery-conflict.sh" 2>/dev/null
|
|
197
197
|
command -v rt_delivery_note_out >/dev/null 2>&1 && trap rt_delivery_note_out EXIT
|
|
198
198
|
command -v rt_delivery_conflict >/dev/null 2>&1 && rt_delivery_conflict
|
|
@@ -215,7 +215,7 @@ check_task() {
|
|
|
215
215
|
# lifts it.
|
|
216
216
|
judge_column="${3:-no}"
|
|
217
217
|
rt_needs rt_task_state git-guard-delivery || return 0
|
|
218
|
-
state="$(
|
|
218
|
+
state="$(rt_delivery_task_state "$number" 2>/dev/null)" || return 0
|
|
219
219
|
[ -z "$state" ] && return 0
|
|
220
220
|
|
|
221
221
|
printf '%s' "$state" | jq -e '.exists' >/dev/null 2>&1 \
|
|
@@ -345,12 +345,12 @@ printf '%s' "$cmd" \
|
|
|
345
345
|
| grep -qE "${RT_CMD_BOUND}(gh[[:space:]]+pr[[:space:]]+create|glab[[:space:]]+mr[[:space:]]+create|az[[:space:]]+repos[[:space:]]+pr[[:space:]]+create)([[:space:]]|\$)" \
|
|
346
346
|
|| exit 0
|
|
347
347
|
|
|
348
|
-
branch="$(
|
|
348
|
+
branch="$(rt_delivery_current_branch)"
|
|
349
349
|
[ -z "$branch" ] && exit 0 # a detached HEAD is not about this case
|
|
350
350
|
|
|
351
351
|
# A local branch without a number is lawful, and a PR from it is not: an edit that travels to the
|
|
352
352
|
# main branch starts from a task. This is the only place where a task-less branch runs into a wall.
|
|
353
|
-
|
|
353
|
+
rt_delivery_branch_form_ok "$branch" \
|
|
354
354
|
|| deny "BLOCKED: a request from the branch «${branch}», with no task standing behind it. An edit begins with a task visible in the work queue: create it — ${task_new} — and move the work into a branch with its number."
|
|
355
355
|
|
|
356
356
|
number="$(rt_task_branch_number "$branch")"
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# rt-hook: PreToolUse Bash|mcp__webstorm__execute_terminal_command|mcp__webstorm__execute_tool
|
|
3
|
+
# Requires: hooks/deny-tail.sh, hooks/guard-note.sh
|
|
4
|
+
# Guard of the commit hooks. PreToolUse on a git commit or push that skips the tree's git hooks.
|
|
5
|
+
#
|
|
6
|
+
# The commit hooks check the message, the formatting and the document pair; the push gate does not
|
|
7
|
+
# read commit messages. A commit made past the hooks therefore reaches the host unchecked: an amend
|
|
8
|
+
# that fixed a one-letter typo in the subject went that way, and the message nobody checked was
|
|
9
|
+
# pushed. The rule `git-workflow` says: an amend goes through the same hooks as a commit, and a
|
|
10
|
+
# commit that skipped them is redone without the skip before the push.
|
|
11
|
+
#
|
|
12
|
+
# What counts as a skip, read in the command position of `git commit` and `git push`:
|
|
13
|
+
#
|
|
14
|
+
# --no-verify — on both verbs, the full name or its abbreviation down to `--no-veri`
|
|
15
|
+
# -n — on `git commit` only, alone or in a cluster of short keys before a key that
|
|
16
|
+
# takes a value (`-nm`, `-an`); on `git push` `-n` is a dry run and passes
|
|
17
|
+
# -c core.hooksPath=<path> — between `git` and the verb: the hooks are looked for elsewhere
|
|
18
|
+
# HUSKY=0 — an environment assignment in front of the call: the hook runner stays silent
|
|
19
|
+
#
|
|
20
|
+
# Text inside quotes and the value of a key that takes one (`-m`, `-F` and the rest) are not read:
|
|
21
|
+
# a commit message naming the flag is not a skip.
|
|
22
|
+
#
|
|
23
|
+
# There is no lawful bypass: the owner forbade skipping the checks for any edit.
|
|
24
|
+
#
|
|
25
|
+
# FAIL-OPEN: no awk, broken input, a tool that is not a command — pass. A broken guard must not get
|
|
26
|
+
# in the way of work.
|
|
27
|
+
|
|
28
|
+
RT_GUARD_NAME=git-guard-no-verify
|
|
29
|
+
|
|
30
|
+
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/utf8.sh" 2>/dev/null || true
|
|
31
|
+
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/hook-input.sh" 2>/dev/null || true
|
|
32
|
+
|
|
33
|
+
rt_hook_read
|
|
34
|
+
input="$RT_HOOK_INPUT"
|
|
35
|
+
[ -z "$input" ] && exit 0
|
|
36
|
+
|
|
37
|
+
tool="$(rt_hook_tool)"
|
|
38
|
+
case "$tool" in
|
|
39
|
+
Bash | mcp__webstorm__execute_terminal_command | mcp__webstorm__execute_tool) ;;
|
|
40
|
+
*) exit 0 ;;
|
|
41
|
+
esac
|
|
42
|
+
|
|
43
|
+
cmd="$(rt_hook_cmd)"
|
|
44
|
+
|
|
45
|
+
# The universal executor of the environment passes the real command as a nested string.
|
|
46
|
+
if [ "$tool" = "mcp__webstorm__execute_tool" ] && command -v perl >/dev/null 2>&1; then
|
|
47
|
+
inner="$(printf '%s' "$cmd" | perl -0ne '
|
|
48
|
+
if (/--command(?:=|\s+)(?:"((?:[^"\\]|\\.)*)"|\x27([^\x27]*)\x27|(.+))/s) {
|
|
49
|
+
print defined $1 ? $1 : (defined $2 ? $2 : $3);
|
|
50
|
+
}
|
|
51
|
+
' 2>/dev/null)"
|
|
52
|
+
[ -n "$inner" ] && cmd="$inner"
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
command -v awk >/dev/null 2>&1 || exit 0
|
|
56
|
+
|
|
57
|
+
# One line per skipping call: the verb and the form of the skip. A line of the command ends a call
|
|
58
|
+
# the same way a separator does, so a verb never carries over into the next line.
|
|
59
|
+
hits="$(printf '%s\n' "$cmd" | awk -v sq="'" '
|
|
60
|
+
function reset_call() { verb = ""; husky = 0; hookspath = 0; skip_value = 0; quote = "" }
|
|
61
|
+
function report(form) { if (verb == "commit" || verb == "push") print verb " " form }
|
|
62
|
+
function takes_value(w) {
|
|
63
|
+
return w == "-m" || w == "-F" || w == "-c" || w == "-C" || w == "-t" || w == "-o" \
|
|
64
|
+
|| w == "--message" || w == "--file" || w == "--template" || w == "--author" \
|
|
65
|
+
|| w == "--date" || w == "--reuse-message" || w == "--reedit-message" \
|
|
66
|
+
|| w == "--fixup" || w == "--squash" || w == "--push-option" || w == "--repo"
|
|
67
|
+
}
|
|
68
|
+
BEGIN { reset_call() }
|
|
69
|
+
{
|
|
70
|
+
reset_call()
|
|
71
|
+
for (i = 1; i <= NF; i++) {
|
|
72
|
+
word = $i
|
|
73
|
+
# Text inside quotes is a value, not a key: skipped up to the closing quote.
|
|
74
|
+
if (quote != "") {
|
|
75
|
+
if (substr(word, length(word), 1) == quote) quote = ""
|
|
76
|
+
continue
|
|
77
|
+
}
|
|
78
|
+
first = substr(word, 1, 1)
|
|
79
|
+
if ((first == sq || first == "\"") && !(length(word) > 1 && substr(word, length(word), 1) == first)) {
|
|
80
|
+
quote = first
|
|
81
|
+
skip_value = 0
|
|
82
|
+
continue
|
|
83
|
+
}
|
|
84
|
+
if (word == "&&" || word == "||" || word == ";" || word == "|") { reset_call(); continue }
|
|
85
|
+
if (skip_value) { skip_value = 0; continue }
|
|
86
|
+
if (verb == "" && word ~ /^HUSKY=0$/) { husky = 1; continue }
|
|
87
|
+
base = word
|
|
88
|
+
sub(/^.*\//, "", base)
|
|
89
|
+
if (verb == "" && base == "git") {
|
|
90
|
+
for (j = i + 1; j <= NF; j++) {
|
|
91
|
+
arg = $j
|
|
92
|
+
if (arg == "-c") {
|
|
93
|
+
if (tolower($(j + 1)) ~ /^core\.hookspath=/) hookspath = 1
|
|
94
|
+
j++
|
|
95
|
+
continue
|
|
96
|
+
}
|
|
97
|
+
if (arg == "-C" || arg == "--git-dir" || arg == "--work-tree" \
|
|
98
|
+
|| arg == "--namespace" || arg == "--exec-path") { j++; continue }
|
|
99
|
+
if (substr(arg, 1, 1) == "-") continue
|
|
100
|
+
verb = arg
|
|
101
|
+
break
|
|
102
|
+
}
|
|
103
|
+
i = j
|
|
104
|
+
if (husky) report("HUSKY=0")
|
|
105
|
+
if (hookspath) report("-c core.hooksPath")
|
|
106
|
+
continue
|
|
107
|
+
}
|
|
108
|
+
if (verb == "") continue
|
|
109
|
+
if (word ~ /^--no-veri(f|fy)?$/) { report("--no-verify"); continue }
|
|
110
|
+
if (takes_value(word)) { skip_value = 1; continue }
|
|
111
|
+
if (verb == "commit" && word ~ /^-[a-zA-Z]+$/) {
|
|
112
|
+
# A cluster of short keys: the letters after a key that takes a value are that value.
|
|
113
|
+
for (k = 2; k <= length(word); k++) {
|
|
114
|
+
ch = substr(word, k, 1)
|
|
115
|
+
if (ch == "n") { report("-n"); break }
|
|
116
|
+
if (index("mFcCtS", ch) > 0) break
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
' 2>/dev/null | sort -u)"
|
|
122
|
+
[ -z "$hits" ] && exit 0
|
|
123
|
+
|
|
124
|
+
what="$(printf '%s\n' "$hits" | sed 's/^/git /' | paste -sd ',' - | sed 's/,/, /g')"
|
|
125
|
+
|
|
126
|
+
reason="BLOCKED by git-guard-no-verify: «${what}» skips the git hooks of the tree.
|
|
127
|
+
|
|
128
|
+
The commit hooks check the message, the formatting and the document pair, and the push gate does not read commit messages: a commit made past the hooks reaches the host unchecked. An amend goes through the same hooks as a commit, a one-letter typo included. Run the same command without the skip; when a hook refuses, fix what it names. A commit already made past the hooks is redone without the skip before the push — the rule git-workflow."
|
|
129
|
+
|
|
130
|
+
# shellcheck disable=SC1090
|
|
131
|
+
[ -f "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/deny-tail.sh" ] \
|
|
132
|
+
&& . "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/deny-tail.sh" 2>/dev/null
|
|
133
|
+
command -v rt_deny_tail >/dev/null 2>&1 || rt_deny_tail() { :; }
|
|
134
|
+
deny_tail_text="$(rt_deny_tail)"
|
|
135
|
+
[ -n "$deny_tail_text" ] && reason="${reason}
|
|
136
|
+
|
|
137
|
+
${deny_tail_text}"
|
|
138
|
+
|
|
139
|
+
jq -n --arg r "$reason" '{hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:$r}}' 2>/dev/null \
|
|
140
|
+
|| printf '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"A git commit or push that skips the git hooks is refused. Run it without the skip."}}\n'
|
|
141
|
+
|
|
142
|
+
exit 0
|
|
@@ -112,12 +112,20 @@ git rev-parse --is-inside-work-tree >/dev/null 2>&1 || exit 0
|
|
|
112
112
|
# copy holds someone else's uncommitted work. A call made from there is judged by the copy the
|
|
113
113
|
# session stands in — that is, by a foreign tree: its stale archive and its half-written spec refuse
|
|
114
114
|
# the call, while the contribution actually leaving is never checked at all.
|
|
115
|
+
#
|
|
116
|
+
# A second copy is the same shared `.git` directory under another root. Another repository is no
|
|
117
|
+
# copy of this tree, and its root differs from the session root always: judged by the roots alone,
|
|
118
|
+
# a session of one tree could not push a branch into another repository at all. Such a call is not
|
|
119
|
+
# judged by this guard — the set of this tree says nothing about a foreign one.
|
|
115
120
|
moved="$(printf '%s' "$cmd" | sed -nE 's/.*(^|[;&|[:space:]])cd[[:space:]]+([^[:space:];&|]+).*/\2/p' | head -1)"
|
|
116
121
|
moved="${moved%\'}"; moved="${moved#\'}"
|
|
117
122
|
moved="${moved%\"}"; moved="${moved#\"}"
|
|
118
123
|
if [ -n "$moved" ] && [ -d "$moved" ]; then
|
|
119
124
|
moved_root="$(git -C "$moved" rev-parse --show-toplevel 2>/dev/null)"
|
|
120
125
|
here_root="$(git rev-parse --show-toplevel 2>/dev/null)"
|
|
126
|
+
moved_repo="$(git -C "$moved" rev-parse --path-format=absolute --git-common-dir 2>/dev/null)"
|
|
127
|
+
here_repo="$(git rev-parse --path-format=absolute --git-common-dir 2>/dev/null)"
|
|
128
|
+
[ -n "$moved_repo" ] && [ -n "$here_repo" ] && [ "$moved_repo" != "$here_repo" ] && exit 0
|
|
121
129
|
if [ -n "$moved_root" ] && [ -n "$here_root" ] && [ "$moved_root" != "$here_root" ]; then
|
|
122
130
|
push_deny "BLOCKED: the call goes from a second working copy — «${moved_root}», while the session stands in «${here_root}». The gate set runs where the session was started, not where the call was made: someone else's uncommitted work refuses it, and the contribution actually leaving passes unchecked. The second copy is for reading; bring the result of the merge back and send from the copy the session stands in."
|
|
123
131
|
fi
|
|
@@ -231,6 +231,10 @@ Docs-skip: правка только в тестах хука, зеркала у
|
|
|
231
231
|
|
|
232
232
|
## Common misses
|
|
233
233
|
|
|
234
|
+
- **An amend goes through the same hooks as a commit.** The flag that skips the commit hooks is not
|
|
235
|
+
used for any edit, a one-letter typo in the subject included. The gate before a push does not
|
|
236
|
+
read commit messages, so a message the hook never saw reaches the host unchecked. A commit that
|
|
237
|
+
skipped the hooks is redone without the flag before the push.
|
|
234
238
|
- **An audit right after adding answers "no" when the card already stands.** The work queue gives
|
|
235
239
|
out a new item not in the same second it was created, and the last step reads it by the next
|
|
236
240
|
call. The answer to this is to reread the whole queue, not to create the card a second time: two
|
|
@@ -44,9 +44,8 @@ the archive, the records of past sessions — are reached first. "Not found in s
|
|
|
44
44
|
the place, not of the tree, and the question names where the search went.
|
|
45
45
|
|
|
46
46
|
Exploration ends with command output, not with a feeling. Before the first question the executor
|
|
47
|
-
knows
|
|
48
|
-
|
|
49
|
-
rules). Without such a list exploration runs as a mood, and a read handover passes for it.
|
|
47
|
+
knows how the repository is arranged (the root memo), what lies in the directory at hand (`ls`), and
|
|
48
|
+
whether something is written on the theme (a search over the documentation and the rules).
|
|
50
49
|
|
|
51
50
|
Exploration over a created task ends with a reproduced symptom, not a found file. The task body
|
|
52
51
|
describes the tree on the day of creation, and exploration by the names from the body confirms only
|
|
@@ -60,13 +59,11 @@ and only then come the questions about techniques. The answer to "how is this do
|
|
|
60
59
|
folder, and generalised into a map of the tree it lies: the neighbouring family of directories is
|
|
61
60
|
left out, and the owner finds the loss.
|
|
62
61
|
|
|
63
|
-
What was inferred is marked right in the list, together with what confirms it
|
|
64
|
-
neighbouring case next to what was checked reads as checked.
|
|
62
|
+
What was inferred is marked right in the list, together with what confirms it.
|
|
65
63
|
|
|
66
64
|
**A ready-made module of the same kind is looked for before the first question** — in this tree and
|
|
67
65
|
in the trees recorded as samples of its layout. The one found is read whole: it closes the questions
|
|
68
|
-
about the structure — the source of the numbers, the rows, the screen, the storage.
|
|
69
|
-
menus about such a module was closed by the owner naming it; the search costs one listing.
|
|
66
|
+
about the structure — the source of the numbers, the rows, the screen, the storage.
|
|
70
67
|
|
|
71
68
|
The six questions are asked minus those the exploration answered: instead of a question with a ready
|
|
72
69
|
answer, the grill gets the line "taking such-and-such answer, here is where from". The sign is one —
|
|
@@ -104,8 +101,11 @@ such answer the remaining questions go into the grill as decisions — what is t
|
|
|
104
101
|
and the owner gets the list in one line, not a menu. The guard of the conversation refuses the third
|
|
105
102
|
menu itself; a menu goes out again only for a question no assumption closes, and says so first.
|
|
106
103
|
|
|
107
|
-
The
|
|
108
|
-
|
|
104
|
+
**The streak is counted over the session record, not per task.** After two «recommended» answers at
|
|
105
|
+
the end of one task, the next task's questions go into its grill as decisions from the start.
|
|
106
|
+
|
|
107
|
+
The size of the work is never a ground for a question about boundaries: the owner decided it before
|
|
108
|
+
the work began.
|
|
109
109
|
|
|
110
110
|
The form of a question is set by the owner's settings: where a menu is required, a menu is asked,
|
|
111
111
|
and a free option is added to every question — a closed set has no line "wrong question".
|
|
@@ -27,6 +27,12 @@ between them. Entering by a direct address raises the application anew, it has n
|
|
|
27
27
|
and the pass reads as "the defect is not confirmed". That is how a panel that got stuck in the
|
|
28
28
|
address on leaving for a neighbouring section went out to production.
|
|
29
29
|
|
|
30
|
+
An action that adds a node to the page — sending a message, adding a row, attaching a file — is
|
|
31
|
+
done at least twice in one test. The first time the page holds only the node the action needs; the
|
|
32
|
+
second time it also holds the one the first action added, and a query that matched by a shared mark
|
|
33
|
+
now finds the wrong node. One send per test passes against a handler that breaks on every second
|
|
34
|
+
send.
|
|
35
|
+
|
|
30
36
|
Elements are found by `qa-dataid`: classes change together with the layout, and a search by role
|
|
31
37
|
and text breaks on translations.
|
|
32
38
|
|
|
@@ -124,6 +130,11 @@ been pressed at all. The popup is closed and its absence awaited by the same pai
|
|
|
124
130
|
|
|
125
131
|
## Common misses
|
|
126
132
|
|
|
133
|
+
- **A service limit per client address counts the whole suite as one client.** Every test goes from
|
|
134
|
+
one machine, so a limit on requests per minute is reached by the sum of the tests, not by any one
|
|
135
|
+
of them. Adding tests pushes old ones into refusal (429): a run of one spec stays green, and only
|
|
136
|
+
the full set shows it. Each test that opens a new record gets its own client address; the limit
|
|
137
|
+
itself is not raised for the suite.
|
|
127
138
|
- **Take the rendering server port with care:** the developer's stand goes by the same name
|
|
128
139
|
`ssr:<rendering port>` through `host-gateway`, and while a foreign process hangs on it, the stand
|
|
129
140
|
serves a foreign build.
|
|
@@ -19,7 +19,7 @@ together with the rule.
|
|
|
19
19
|
| In the law | Here |
|
|
20
20
|
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
21
|
| document | any `.md` outside `docs/archive/`, plus code comments, commit bodies and PR descriptions |
|
|
22
|
-
| a path named in a document | a string with
|
|
22
|
+
| a path named in a document | a string in backticks with a slash or a file extension — that is what the check looks for. A name with a slash that is no address, such as a story title, goes without backticks |
|
|
23
23
|
| the change a document describes | a pair from `docs-guard`: a rule and its mirror, a `.proto` and a spec, a hook and its scenarios, a moved file and both libs' READMEs |
|
|
24
24
|
| description of the past | `docs/archive/` — excluded from the path check entirely |
|
|
25
25
|
|
|
@@ -121,7 +121,9 @@ flowchart TD
|
|
|
121
121
|
not inserted in the middle and does not take a deleted one — the deleted number's place stays
|
|
122
122
|
empty. The number ties the scenario to its test, and issued a second time it leaves the old
|
|
123
123
|
reference right on the surface; renumbering in sequence is deceptively cheap — the tests are green
|
|
124
|
-
both before and after.
|
|
124
|
+
both before and after. The free number is asked of the tree's command before the scenario heading
|
|
125
|
+
is written, and the companion names that command: the main branch alone does not show numbers
|
|
126
|
+
neighbouring work holds on disk.
|
|
125
127
|
- **A scenario and the title of its test are edited by one change.** The promise changed — the
|
|
126
128
|
number stays, and the test title is edited by the same commit; the scenario deleted — the test is
|
|
127
129
|
deleted too. Having drifted apart, they leave the run green while it checks something else.
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|