Commit Graph

973 Commits

Author SHA1 Message Date
john 200bac92ad Merge docs/wechat-history-snippet-disposition: branch disposition closeout.
Memind CI / Test, build, and release guards (push) Successful in 5m58s
2026-09-24 13:35:13 +08:00
john e45ec26892 Register disposition for news-morning WeChat history snippet branch.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 13:35:13 +08:00
john 98f79b6ada Merge feature/news-morning-wechat-history-snippet: WeChat draft history snippet.
Memind CI / Test, build, and release guards (push) Failing after 4m51s
2026-09-24 11:27:58 +08:00
john dbb16f0678 Include three compact history items in WeChat morning draft inline body.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 11:27:40 +08:00
john 2afe7df4a5 Merge feature/news-morning-subscribe-history-cover: news cover, subscribe, history spec.
Memind CI / Test, build, and release guards (push) Successful in 5m56s
2026-09-24 10:51:59 +08:00
john d4ad546fe2 Prefer news images for WeChat draft cover and tighten news002 subscribe/history blocks.
Cover upload now tries lead-card and card images before image_make; template spec requires bind-then-reply-2 subscribe flow and inline on-this-day history facts instead of external link grids.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 10:51:59 +08:00
john 3cfd807db6 Merge feature/news-morning-major-anchor-queries: anchor prefetch + weather WeChat fix.
Memind CI / Test, build, and release guards (push) Successful in 6m23s
2026-09-24 09:25:22 +08:00
john b1f8fbb6e4 Add major-news anchor prefetch and fix news002 weather WeChat rendering.
Anchor queries boost retrieval for diplomacy, finance, and AI headlines; inline conversion now reads news002 wc/we/wt weather cards so drafts show city forecasts again.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 09:25:19 +08:00
john af8bbc46a6 docs: register mindspace-guards-canary-post-rollout branch
Memind CI / Test, build, and release guards (push) Successful in 4m7s
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 17:45:10 +08:00
john e64cf52f23 fix(mindspace): restore publish guards and safe 103 goosed canary routing
Finish-sync guards now accept SEO/GEO disk enrichment instead of requiring
byte-identical HTML, and fragment writes no longer duplicate doctype. Users
canary mode keeps the full native pool while routing allowlisted identities
to :18015 without overriding memory settings.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 17:44:45 +08:00
john 5e2f27d622 docs: register goose-v149-prod-log-fixes branch
Memind CI / Test, build, and release guards (push) Failing after 15m3s
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 14:42:37 +08:00
john 8bdf4f3c6c docs(goose): record 103 v1.49 log audit and cutover status
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 14:25:24 +08:00
john 3155b5805f feat(agent-run): optional session reply idle timeout and finish reason
MEMIND_SESSION_REPLY_IDLE_TIMEOUT_MS (off by default, min 30s) fails a reply
that stops streaming while no tool is running, and is recoverable like other
finish errors. The goose Finish reason is surfaced in session_finished.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 14:25:24 +08:00
john e181daf429 fix(goosed-ops): raise goosed nofile limit and add 103 pool hardening script
launchd leaves goosed at a 256 soft nofile limit, causing EMFILE on busy
sessions. The run script now raises ulimit -n; the hardening script applies
this and the harness shim to the live pool with backup, rolling restart,
health checks and --rollback.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 14:25:24 +08:00
john afeafa1d57 fix(goosed-ops): ship mysql2 CLI shim for harness memory on native pool
The 103 harness shim imported mysql2 from a Docker-only path, so every
harness_remember failed on the native pool. The shim resolves mysql2 from
the Portal runtime (or MEMIND_MYSQL2_MODULE) and ships in the runtime.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 14:25:24 +08:00
john 69c8ce7517 docs: register news-morning-repair-not-block branch
Memind CI / Test, build, and release guards (push) Successful in 3m42s
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 14:00:14 +08:00
john 57a9aadf53 fix(news): repair instead of block in daily news generation and push
Memind CI / Test, build, and release guards (push) Successful in 4m43s
- news002 image/structure audit no longer throws: prune empty sections and
  publish a best-effort page with a warning
- WeChat push strips images that failed to upload instead of refusing the draft
- forceGenerateOnce is cleared before running, so a failed run cannot loop;
  the archived page is restored when generation fails
- degraded-page regeneration runs at most once per day
- content safety rules cover vulgar sexual terms and gossip/adult sites

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 11:29:35 +08:00
john 371beb59f1 docs: register news-morning-content-safety branch and production test account
Memind CI / Test, build, and release guards (push) Successful in 6m12s
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 11:02:14 +08:00
john c136f06823 feat(news): add content safety baseline gate for daily news morning
Memind CI / Test, build, and release guards (push) Successful in 4m51s
Rules-first safety gate covering adult content, minor protection, legal
compliance (stock tips, crypto promotion, gambling, drugs, source
provenance for political news) and ethics (tragedy tone, discrimination,
gossip). Filters without blocking publication:

- SearXNG prefetch uses safesearch=2 and drops block-level results before
  they can be supplemented into the page
- worker sanitizes the page after dedupe and after the image gate, with a
  single batched model review; review-level items are removed fail-safe
  when the reviewer is unavailable
- sections the gate filtered are exempt from fill/structure audits so
  filtering never turns into a failed generation
- push/preview recheck removes block-level items and masks title/digest
- AI-assisted disclosure in page footer and WeChat draft, plus aigc and
  content-safety meta markers

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 10:24:29 +08:00
john 7de5eeba61 docs: register closed and abandoned local branches (2026-09-23)
Memind CI / Test, build, and release guards (push) Successful in 3m49s
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 10:09:38 +08:00
john e5cbe80644 feat(wechat): widen 105 egress proxy to /cgi-bin/* and add egress fetch helper
The proxy now forwards any api.weixin.qq.com/cgi-bin/* path (drafts, material
upload, etc.), binds to the 10.10.0.1 tunnel address, and uses a 120s timeout.
wechat-egress-fetch.mjs rewrites WeChat API URLs to the egress base when
MEMIND_WECHAT_EGRESS_BASE_URL is set.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 10:07:32 +08:00
john 028bb18dc0 feat(news): add single news-item page generation and early page-ready wait
Scheduled tasks can finish once the expected HTML is on disk and stable,
instead of waiting for Goose Finish. Adds news-item templates and scripts
for generating a single-event page and committing it as a WeChat draft.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 10:07:32 +08:00
john c36558e0f3 feat(wechat): keep morning/weather push for suspended billing users
Memind CI / Test, build, and release guards (push) Successful in 4m20s
欠费停用用户仍送达早安与天气,跳过复杂页面订阅与定时任务补发。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 16:30:40 +08:00
john bbee02b565 fix(news): align news002 defaults with tests for portal release
Update template version exports and draft worker tests so fast release
guards pass with the news-engine integration branch.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 15:34:15 +08:00
john 4a26db5e84 feat(news): ship news002 fill gate and full WeChat draft push
Lock scheduled morning news to news002 with section-fill gates, headline lead-card normalization, SearXNG top-up to max, and push that keeps imageless cards as text while requiring uploaded images where present.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 14:05:40 +08:00
john a96a9d0e14 feat: consume independent news engine 2026-09-22 10:19:54 +08:00
john c1d43c8ea3 docs: register feature/news002-searxng-fallback branch disposition
Memind CI / Test, build, and release guards (push) Successful in 4m15s
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 09:36:13 +08:00
john 58003e88a0 feat(news): harden news002 image gate after main merge
Memind CI / Test, build, and release guards (push) Has been cancelled
Reject weak or unreachable source images, auto-promote lead cards for
structure audit, and relax push gates while keeping text-only cards.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 09:34:00 +08:00
john 67951c1862 Merge origin/main into feature/news002-searxng-fallback
Integrate news002 image localization and compact wechat layout from main
while keeping SearXNG fallback enrichment in the draft worker.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 09:29:05 +08:00
John 96146a265e docs: register feature/searxng-news-morning-throttle release on 103
Memind CI / Test, build, and release guards (push) Has been cancelled
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 07:52:11 +08:00
John b74ab4ec46 feat(wechat): news002 草稿左上角小图,配图本地化且缺图保留文字卡
Memind CI / Test, build, and release guards (push) Has been cancelled
微信 inline 与静态页 lead-card 统一为左侧缩略图;远程配图下载到当日 public/ 后再上传微信素材。SearXNG 预取与配图 enrichment 链路同步收紧,禁止默认占位小图删卡。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 07:36:20 +08:00
john 2b21ca50e1 fix(news): strip imageless cards in gate without dropping fallback sections
Defer empty-section pruning until after the image gate passes so SearXNG
fallback shells survive enrichment; push audit skips empty core sections.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 16:57:34 +08:00
john b53ee25738 fix(news): hide imageless news002 cards and prune empty sections
Drop story cards without real images from HTML and WeChat drafts instead
of showing ph placeholders, and remove emptied sections for layout balance.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 16:42:50 +08:00
john 4695e47668 fix(news): replace imageless news002 cards via SearXNG repair pass
After enrichment fails to resolve og:image, swap out imageless story cards
with SearXNG candidates before the image gate rejects the draft.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 16:18:48 +08:00
john 1ee2440faf fix(news): relax SearXNG fallback when prefetch images are missing
Allow no-image candidates and create missing section shells so news002
image gate can pass after source-page enrichment on thin agent output.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 15:47:58 +08:00
john 0092af5c0d feat(news): add SearXNG fallback when news002 agent output is thin
When the post-generation audit fails, supplement missing core sections,
headlines, and brief items from prefetched SearXNG groups before re-running
image enrichment and the push gate.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 15:10:07 +08:00
john 2e436664ce docs: remove trailing spaces in migration note
Memind CI / Test, build, and release guards (push) Successful in 4m59s
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 11:04:40 +08:00
john 6a88b98044 feat: enforce real imagery for news002
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 11:03:55 +08:00
john 91d5c7a1fd chore(infra): update Studio/103 host IP to 114.85.107.50
Replace all references to the previous Portal host 180.159.29.143 with
114.85.107.50 across release scripts, safety gates, runbooks, and docs.

Also add scripts/push-wechat-news-morning-draft-now.mjs for direct draft
push without waiting on the worker poll interval.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 09:49:09 +08:00
john 2049bc8c6e fix(news): count lead cards in degradation check, add draft dry-run script
Trying to push a WeChat draft locally surfaced two problems.

isNewsMorningContentDegraded matched cards with `class="card(?:\s|")`, which
never matches news002's `class="lead-card"`. Headline cards were therefore
invisible to the check, so a healthy news002 page could be flagged as degraded
and regenerated. Count cards through the shared extractor instead, which
handles card, lead-card and highlight-box alike.

Add scripts/dryrun-news-morning-draft.mjs to run a page through the dedup gate,
degradation check, inline conversion and footer layout without calling the
WeChat API, since local IPs are not in the official account whitelist
(errcode 40164) and a real push would write into the production draft box.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 09:31:54 +08:00
john 5708b333cc feat(news): add news002 morning-report template with dedup gate and card images
Freeze the 2026-09-18 layout as news001 and add news002 alongside it.

Analysis of the 0918 production page found 49 news cards covering only ~20
distinct events (4x "王毅同鲁比奥通电话", 5x "东博会南宁开幕"), citing just 7
URLs that are all section landing pages rather than article permalinks, with
zero images. The root cause is structural: 23 fixed sections with fixed card
quotas force padding when the day yields fewer events.

news002 changes the contract so events decide sections, not the reverse:
core sections always render, flex sections are dropped entirely when they have
no unused event, total story cards are capped at 28, and every card carries a
data-event-key fingerprint.

Add wechat-news-morning-dedup.mjs as a post-generation gate, since the prompt
level "no duplicates" rule is unverifiable. It dedupes by event key, then by
article permalink (deliberately ignoring section landing pages, which would
otherwise delete most of the page), then by CJK bigram title similarity, since
the existing whitespace-tokenised matcher does not work on Chinese titles.

Carry per-item images through normalizeSearchResult into the prefetch brief so
cards can render real article thumbnails with a placeholder fallback.

Teach the WeChat inline converter both DOM variants (lead-card, masthead meta,
lede). Per-card images in the WeChat draft body remain a known gap.

Template selection is config/env driven and still defaults to news001.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 09:19:41 +08:00
john 18389a28dc docs: register feature/wechat-push-secret-codes branch disposition
Memind CI / Test, build, and release guards (push) Successful in 3m30s
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-20 19:30:15 +08:00
john bb6aa75b3b feat(wechat): add secret codes for morning subscribe and news push
Memind CI / Test, build, and release guards (push) Successful in 4m14s
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-20 19:10:27 +08:00
john 830f8a4011 feat(wechat): add service-account push subscriptions and news morning cover delivery
Memind CI / Test, build, and release guards (push) Successful in 5m36s
Ship the 10-item numeric subscription loop on WeChat MP, wire schedule delivery
for news/weather/quote/health/finance/tech/knowledge/night/surprise pushes, and
extend news morning draft cover generation plus a one-shot draft push script.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-20 16:15:15 +08:00
John 1c007999e5 docs: register feature/chat-intent-stage-a and leftover news-morning branch
Memind CI / Test, build, and release guards (push) Successful in 4m39s
Record the merged chat-intent work as closed, and mark the leftover local news-morning branch as not reusable.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-19 21:02:50 +08:00
John a30b62b987 feat(chat-intent): observe routing, keep discuss-first on chat, and escalate short follow-ups
Memind CI / Test, build, and release guards (push) Has been cancelled
Close the chat-session dead zone without flipping production flags: record 0.72 fallbacks, stop C-2 from treating「先聊聊」as execute, and promote「不对你去执行」after a completed direct turn on both h5direct and date sessions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-19 13:13:17 +08:00
John 82811d7b89 chore(news-morning): lock template reference to daily-news-0918
Memind CI / Test, build, and release guards (push) Successful in 3m10s
Finalize the approved 2026-09-18 refined briefing as the production layout and SEO reference for future auto-generation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 09:46:28 +08:00
John e962d86ba5 feat(news-morning): enable comments, compact WeChat layout and SEO spec
Default open WeChat draft comments, add SEO/visual template rules with h2 sections and mindspace-geo, and compress inline styles to pack more cards within the 20k HTML budget.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 09:29:30 +08:00
John 9ae35f38e1 fix(news-morning): drop hot section and WeChat stats row
Remove the trending/hot search lane and section, forbid stats summary in page spec, and stop injecting card/section counts into WeChat inline articles.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 09:00:46 +08:00
John af0282e963 feat(news-morning): add full-tier channels with cross-group dedupe
Expand daily briefing prefetch and template to cover Asia-Pacific, commodities, AI/chips, policy, community, science, culture, startup, crypto, geopolitics, cities and wire feeds, with URL/title deduplication across sections.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 08:12:10 +08:00