Repository navigation
feat(hooks): ad-grade slogans in five languages + eight writing rules in the hook prompt - #13
Conversation
…sions), eight writing rules in HOOK_RULE, old hooks kept as hook_prev
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fdad336e0c
ℹ️ 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".
| "nodedevelopersack/Cubase", "scarletscreengrasp/Uttorent", "twilightstonerestore/Glary-Utilities-Pro"} | ||
|
|
||
| def test_listed_repos_are_rewritten_too_except_literal_labels_and_one_already_plain_text(self): | ||
| same = {n for n, v in LIB["entries"].items() for e in v.values() if e["hook"] == e["hook_prev"]} |
There was a problem hiding this comment.
Scope the rewrite assertions to the baseline library entries
When discovery adds a new repository or a new source-description hash, its first newcomer_i18n.put_hook() call creates hook but no hook_prev, because there is no previous hook. This assertion scans every live library entry and consequently raises KeyError: 'hook_prev' after an otherwise successful update; the later loop makes the same assumption. I reproduced this by adding a fresh entry through put_hook() and running this test. In .github/workflows/daily-update.yml, verification runs after discovery and translation but before commit/push, so newly discovered repositories will block publication. Restrict these historical rewrite assertions to the entries pinned in previous_hooks_baseline.json, allowing future entries to have no previous hook.
Useful? React with 👍 / 👎.
…wn description/README (5 languages), daisyui shortened
What
Ad-grade hooks. Stacked note: PR #12 is already merged, so this branches off current
main(01525b9); no stacking needed.slogans_zh.md(kept astests/fixtures/slogans_zh.md, test asserts they match 1:1). zh-Hant (OpenCC Taiwan wording + manual fixes), en, ja, ko were written as copy with the same meaning and flavour, not literal translation. All within the existing limits (zh 36 cols ≈ 18 chars, en 60, ja 56, ko 60).t3dotgg/tstackintentionally keep their flat literal hook (rule 7 / the source text is already plain).routerhubSI/uncensored-ai-apino longer mentions "uncensored" in the hook (rule 7), still in the details.hooks.WRITING_RULES, embedded inHOOK_RULEand therefore inHOOK_PROMPT; the example is now 「看不懂的程序,让 AI 讲给你听」; prompt asks for copy-written (not word-for-word) versions.hook_prev(projects.json and inside each translation-library entry, not shown); when the pipeline replaces a hook it also moves the old one tohook_prev. Long descriptions and all translations untouched (PR feat: one-line hook per project in ranking tables (full descriptions kept in docs/DETAILS) #12 survival tests still pass); no re-translation.tests/fixtures/previous_hooks_baseline.json), all 8 rules in the prompt, length limits for every stored hook in every language, regeneration keepshook_prev, literal labels set.Where a slogan adds something not literally in the source (please review)
helix: 「补全高亮都现成」: source says built-in LSP + tree-sitter (completion/highlighting is the implication).semgrep: 「提交前」 andgrype: 「上线前」: timing not in source.nuclei: 「批量扫」: "bulk" not in source.kubernetes: 「扩容」: scaling not in source ("production-grade container orchestration").terraform: 「改动有据可查」: version history is implied by "as code", not stated.drawio: 「拖拖就画」: dragging not in source.docker/compose: 「写进一个文件」: single file not in source.dbt: 「版本管理和测试」: source says "software engineering practices".kafka: 「稳稳接住」: reliability not stated.jupyter: 「代码结果和说明放在一页」: implied by notebooks.daisyuislogan is 19 characters (rule says ≤18) but 29 columns, fine for the width rule.mcd-meal-mate「不会搭?」 andshipwords「追到新词」 add the reader-pain framing only;hevnsnt/CVEngine「从外面看…哪里有洞,并有证据」 paraphrases "external attack surface ... evidence-based validation".