-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathagent.txt
More file actions
440 lines (368 loc) · 12.7 KB
/
agent.txt
File metadata and controls
440 lines (368 loc) · 12.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
Agent Changes / Reviews
code/code.md:50:5: Trailing whitespace
code/code.txt:7:8: delete trailing whitespace
code/code.txt:58:2: trailing
code/code.txt:100:2: trailing whitespace
code/code.txt:173:32: tidy - check files for leading/trailing whitespace at ends of file
code/style2.txt:9:2: trailing
code/style2.txt:39:34: // comments for single line, or trailing
code/style2.txt:67:2: trailing punctuation
translate.txt:147:7: have trailing whitespace -- nuisance for the translator
travis.txt:10:8: tabs, trailing whitespace
ARRAYs?
attach/attach.h: FILE **fp_idx;
attach/attach.h: struct AttachPtr **idx;
attach/attach.h: struct Body **body_idx;
browser/private_data.h: char ***files;
complete/data.h: const char **match_list;
config/mbtable.h: char **chars;
core/mailbox.h: struct Email **emails;
core/neomutt.h: char **env;
email/email.h: struct Email **emails;
gui/curs_lib.h: char ***files;
mutt/charset.h: const char **inrepls;
mutt/hash.h: struct HashElem **table;
nntp/adata.h: struct NntpMboxData **groups_list;
certificates
add relatives to timestamps (X ago, for Y)
This certificate is valid
from Thu, 26 Dec 2024 09:01:01 UTC (x weeks ago)
to Wed, 26 Mar 2025 09:01:00 UTC (for y months)
means lots more translations!
also key selection
Find more Linked List Nodes, to replace with ARRAY, e.g.
Nodes
address/group.h:53:2: STAILQ_HEAD(GroupList, GroupNode);
mutt/list.h:41:2: STAILQ_HEAD(ListHead, ListNode);
mutt/observer.h:74:2: STAILQ_HEAD(ObserverList, ObserverNode);
mutt/regex3.h:100:2: STAILQ_HEAD(RegexList, RegexNode);
Others
address/address.h:43:1: TAILQ_HEAD(AddressList, Address);
alias/alias.h:42:1: TAILQ_HEAD(AliasList, Alias);
attach/cid.h:41:2: STAILQ_HEAD(CidMapList, CidMap);
color/attr.h:74:1: TAILQ_HEAD(AttrColorList, AttrColor);
color/curses2.h:48:1: TAILQ_HEAD(CursesColorList, CursesColor);
color/regex4.h:47:2: STAILQ_HEAD(RegexColorList, RegexColor);
email/parameter.h:38:1: TAILQ_HEAD(ParameterList, Parameter);
email/tags.h:48:2: STAILQ_HEAD(TagList, Tag);
email/url.h:63:2: STAILQ_HEAD(UrlQueryList, UrlQuery);
gui/mutt_window.h:105:1: TAILQ_HEAD(MuttWindowList, MuttWindow);
hook.c:76:1: TAILQ_HEAD(HookList, Hook);
key/lib.h:76:2: STAILQ_HEAD(KeymapList, Keymap);
mutt/charset.c:80:1: TAILQ_HEAD(LookupList, Lookup);
mutt/logging2.h:88:2: STAILQ_HEAD(LogLineList, LogLine);
mutt/regex3.h:112:2: STAILQ_HEAD(ReplaceList, Replace);
ncrypt/crypt_mod.c:45:2: STAILQ_HEAD(CryptModuleList, CryptModule);
.github README
welcome
rename *_buffer_*() functions to buf, or strip buffer entirely
char[] -> Buffer conversions
which?
upstream patches
split up send() to accommodate bg_edit
compose: move Body wrapping into compose
compose: small fns #3222
<move-to-top>
simple within a group
what does it do at the top level?
altering the first attachment might have consequences
<move-to-bottom>
acting on the first attachment might have consequences
<move-out-of-group>
moves attached file *after* the group it was in
<move-into-group>
moves attached file into the group *above* it
kill the num_accounts and return the value
int mutt_autocrypt_db_account_get_all(struct AutocryptAccount ***accounts, int *num_accounts)
add X_new()/X_free() wrappers for non-trivial objects
QClass, ListNode
SmimeKey, PgpUid, MuttThread
free: see neo/[triv/free]
objects must have X_new()/X_free() pair, or neither
check existing
51 X_new()
55 X_free()
148 struct
292 [cm]alloc
find/distinguish between
struct - simple, data
object - complex, actions
data still needs free for ptrs
too simplistic?
github action
check for @file header, etc
*.c need config.h
*.h need include guard
check for empty line at eof
*.c @page
"calc" undoc'd functions
shellcheck
eliminate fallthroughs - use functions
why are these 3 charset config not using DT_SLIST?
they're only allowed *ONE* charset
mutt_config.c:431:6: { "charset", DT_STRING|D_NOT_EMPTY|D_CHARSET_SINGLE, 0, 0, charset_validator,
mutt_config.c:443:13: { "config_charset", DT_STRING, 0, 0, charset_validator,
nntp/config.c:67:17: { "newsgroups_charset", DT_STRING, IP "utf-8", 0, charset_validator,
bash complete for configure
push to management
dev ml
fuzzy matcher
change Score list to use STAILQ
relative time option for the index_format
3h (ago), 2d, etc
where is punycode encoded/decoded?
extract to lib and test
need neomutt glossary (search first)
add to guide
add more auto-completion
security warnings (132)
30 For loop variable changed in body
26 Poorly documented large function
24 Uncontrolled data used in path expression
21 Local variable address stored in non-local memory
9 Year field changed using an arithmetic operation without checking for leap year
8 Long switch case
3 Nested loops with same variable
3 Futile conditional
2 Time-of-check time-of-use filesystem race condition
2 File created without restricting permissions
2 Cleartext transmission of sensitive information
1 Uncontrolled process operation
1 Unbounded write
turn MoreArgs, MoreArgsF into ONE function and write tests for it
SKIPWS too?
generate tests first
then convert to functions
then merge functions
find users of all the flags
doc common uses of each flag, e.g. a regex, a file, a colour, a comment, a keybinding, a pattern
suggest better methods for parsing these
merge string/Buffer variants of functions
(find them all first)
source! (no error if not exist)
or `source -q`?
sort of implies that it'll quieten all errors from the source'd file
or `source -m` missing-allowed
source -d dir (all of dir/*.rc or *.conf)?
alphabetical / collate
or `source dir.d` (.d significant) -> find all children or just '*.rc'
muttrc ifdef
/file absolute
./file relative source
"source" command relative to $cwd or previous file
source DIR
=> all children
source command -- allow wildcards
fits in nicely with ifndef
or 'source_dir' command to read all contents
or "source dir" to read all contents
recursive option?
recursive by default?
update buf_at() to take negative offsets
-1 == end of string
find uses, look for buf_len() or buf->dsize
upgrade buf_seek() to match fseek()
using SEEK_SET, SEEK_CUR, or SEEK_END (<stdio.h>)
or our own BUF_ enums
rename *_buffer_*() functions to buf, or strip buffer entirely
rename *_buffer_*() functions to buf, or strip buffer entirely
3 mutt_b64_buffer_decode
5 mutt_b64_decode
4 mutt_b64_buffer_encode
8 mutt_b64_encode
2 mutt_socket_buffer_readln
19 mutt_socket_readln
1 mutt_socket_buffer_readln_d
12 mutt_socket_readln_d
test_mutt_b64_buffer_decode
test_mutt_b64_buffer_encode
find all functions with a Buffer parameter
some functions might **append** to the dest buffer
refactor "not reached"
8 ag "not reached"
find potential places for struct Buffer
691 ag "([a-z_]+(->[a-z_]+)*), sizeof\(\1\)"
37 ag "([a-z_]+(->[a-z_]+)*)-\>data, \1-\>dsize"
EBNF for all 88 commands?
categorise the types of all the command parameters
create a plan for auto-completing them
doxy: next big area for coverage?
defines 40%
and drop %age icons?
:changelog ?
read from /usr/share/doc/neomutt
prep dyk
need doc repo for saving emails
devel guide: "how to bisect"
target audience: developer with basic git understanding
and ability to build neomutt
user guide: "how to bisect config"
add "Add profile picture" to welcome letter
add build and analysis pages to welcome email
revamp newbie page
collate all my welcome emails
generate single webpage
repo/org .github README
web/readme bigger deal about starring/donation
IPA NeoMutt /ˌniːoʊ/ /mʌt/
Misc
where are the "source" relative docs?
alias_file, certificate_file, etc aren't relative
alias_file
certificate_file
debug_file
history_file
ssl_ca_certificates_file
relative to what?
all *_files relative to:
1) the source file they're read from
2) current working directory
3) User's muttrc? NO
4) $XDG_CACHE_HOME? NO
how to build neomutt
w.r.t. neomutt -v
dependencies
summarise the last year's commits
then weekly
take my original config docs, plus the diagrams and improve them
∀ command, list:
where its data is ultimately stored
who owns the data
1 Alias Commands (2): alias, unalias
2 Hook Commands (18): Various hooks like account-hook, folder-hook, send-hook, etc.
3 Key Binding Commands (6): bind, unbind, macro, unmacro, exec, push
4 Configuration Commands (10): set, unset, reset, toggle, setenv, unsetenv, etc.
5 List Management Commands (12): Various list commands and their "un" counterparts
6 Hook/Pattern Commands (15): Score, spam, color, ignore commands
7 Mailbox Commands (3): mailboxes, named-mailboxes, unmailboxes
8 Utility Commands (7): source, echo, cd, version, etc.
9 Conditional Commands (4): ifdef, ifndef, finish
10 Other Commands (12): Remaining specialized commands
using `unbind` as a template
split up all commands
COMMAND-NAME ->
parse_command_name() main handler
parse_command_name_args() split line into tokens
-> struct ParseCommandNameArgs
parse_command_name_execute() do the work
write tests for all _args() functions
100% coverage
add _args() to fuzzer?
might affect parsing
`mailboxes good1 bad good2; other command`
current parser fails at 'bad' and stops parsing
new parser would try to parse until EOL or `;`
this would allow the option of executing subsequent commands
probably best to stop on failed command
arg parser should record where in the statement the arg came from
error at line X, column Y
tell copilot about ARRAY_FOREACH() when removing items
and using FREE() which can trample on data
merge
buf_pretty_mailbox -> mutt_pretty_mailbox
void buf_pretty_mailbox(struct Buffer *buf)
void mutt_pretty_mailbox(char *buf, size_t buflen)
mutt_safe_path -> buf_save_path
void mutt_safe_path(struct Buffer *dest, const struct Address *a)
void buf_save_path(struct Buffer *dest, const struct Address *a)
mutt_save_path
void mutt_save_path(char *buf, size_t buflen, const struct Address *addr)
apply it to flatcap-brain-dump
rules: group similar ideas together
never delete notes
mark duplicates
mark similar
mark obsolete
leave unknown/ambiguous notes
apply to `notebook.*` first?
or tidy existing notes first?
exclude work-files/ dir
sort by age
try to eliminate small files (few lines)
turn into a mind map!
Minder (better for beginners)
Freeplane (better for experts)
create a word cloud
explain the docs build process to copilot
and get it to suggest something better
apply it to IRC logs
most asked questions?
common problems
common solutions
suggest help pages
teach copilot about dialogs / functions
analyse and suggest missing functionality
differences in behaviour
create a corpus for each fuzzer
create fuzzer for config type parsing
suggest/create dictionary file for fuzzers
lists of expected keywords
cleanup-by-date .service
config file or fixed date?
teach copilot about lcov build
get 100% coverage cases
lcov --list coverage.info
Summary
gcov mutt/file.c
Details
gcov -t mutt/file.c (stdout)
(rather than saving to file.c.gcov)
-o save-filename
Functions
gcov -f mutt/file.c
teach copilot about asan
env vars
leak/crash files
running tests
"error" prefix in error messages
need refactor + better messages
post command-parsing refactor
propagate ConfigSubset through libraries
∀ library, find all Config lookups
find all library entry points
make sure ConfigSubset is passed in and propagated
test cases, delete contents of /tmp afterwards
need list of tests that gen files
only creates files/dirs in $NEOMUTT_TEST_DIR/tmp/
create a reply flowchart
who from
who to
etc
w.r.t. config, headers, function used
<group-chat-reply> OP_GROUP_CHAT_REPLY
<group-reply> OP_GROUP_REPLY
<list-reply> OP_LIST_REPLY
<reply> OP_REPLY
list hooks too
teach copilot about release notes
categorise commits
reference closed PRs
collate names
new / old? how?
how to make a complete release
today's date
release notes
update dates in files
commit, tag, sign everything
commit count
hooks: unify logging?
LL1 `folder-hook PATTERN`
LL2 command details
LL1 - broad strokes, user actions
LL2 - some details
analyse & suggest logging strategy
skill for "refactor parse"
template code
naming
tests
coverage
list tokens for fuzzing
skill for tables
human legibility
alignment
clang-format
refactor verbose tests
pick out input parameters
pick out output parameters / return code
turn into a table
vim syntax updating / refatoring