Skip to content

Commit 7bdbfd4

Browse files
authored
FM3.2b: paginate Friend Scout watchlist and show verified saved activity (#36)
* FM3.2b: paginated filtered watchlist and verified saved Scout activity * FM3.2b: bounded GET controls and preserved watchlist view in dashboard builder * Test FM3.2b 25-agent pagination, filters, source tampering and exact dashboard delta * Use real newline bytes in FM3.2b synthetic Scout approval hash * Document FM3.2b scope, source provenance and quick operator acceptance * Promote FM3.2b two-file bobctl release manifest from FM3.2a * Advance Friends handoff to tested FM3.2a baseline and FM3.2b watchlist candidate * Correct watch return-link fixture to include a watched agent * Run offline CI whenever FM3.2 interest or watchlist tests change
1 parent 7371396 commit 7bdbfd4

7 files changed

Lines changed: 456 additions & 18 deletions

File tree

‎.github/workflows/inventory-tests.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ on:
4949
- 'src/**'
5050
- 'webui/**'
5151
- 'tests/test_navigation_shell.py'
52+
- 'tests/test_fm32a_interest_review.py'
53+
- 'tests/test_fm32b_watchlist.py'
5254
- 'tests/test_v071_integration.py'
5355
- 'tests/test_v071_http_smoke.py'
5456
- 'tests/test_v071_ui_update.py'
@@ -105,6 +107,8 @@ on:
105107
- 'src/**'
106108
- 'webui/**'
107109
- 'tests/test_navigation_shell.py'
110+
- 'tests/test_fm32a_interest_review.py'
111+
- 'tests/test_fm32b_watchlist.py'
108112
- 'tests/test_v071_integration.py'
109113
- 'tests/test_v071_http_smoke.py'
110114
- 'tests/test_v071_ui_update.py'

‎docs/FRIENDS-ROADMAP-AND-HANDOFF.md‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Bob Friends Manager: FM1–FM5 Roadmap and Fresh-Chat Handoff
22

33
**Status captured:** October 29, 2026 (Pacific time; GitHub main release history includes October 30 UTC).
4-
**Current implementation phase:** **FM3.2a** candidate in PR #35, pending operator acceptance. Next planned: FM3.2b watchlist pagination and verified recency.
5-
**Operator-confirmed working baseline:** `v0.7.5-fm31-watch1` in OpenClawLab WSL2, installed using `bobctl update`; operator confirmed FM3.1's page and controls work.
4+
**Current implementation phase:** **FM3.2b** release candidate (operator acceptance pending), after operator-confirmed FM3.2a. Next planned: FM3.2c evidence-bound local-model proposals.
5+
**Operator-confirmed working baseline:** `v0.7.5-fm32a-interests1` in OpenClawLab WSL2, installed using `bobctl update`; operator confirmed FM3.2a works as expected.
66
**Canonical repository:** `merberg-ai/bob-openclaw-moltbook`, `main`.
77
**This file is a planning/handoff artifact only**. It does not grant permissions or change a service, updater manifest, runtime database or deployment.
88

@@ -32,14 +32,21 @@ This is the **proposed scope**, not a commitment that all four items must be shi
3232

3333
**FM3.2 acceptance:** source citations survive review; no fabricated relationships, agent account identity or mutual follow; no private notes passed into prompts or Moltbook requests; no auto-follow/comment/DM; individual pauses and global switch honored; all existing publication safety tests green; an update through the normal `bobctl update` workflow with backup/rollback.
3434

35-
### FM3.2a implementation checkpoint (not yet operator accepted)
35+
### FM3.2a operator-accepted checkpoint
3636

37-
- **Candidate:** `v0.7.5-fm32a-interests1`, PR #35, one managed module `bob_friend_scout.py` from `v0.7.5-fm31-watch1`.
37+
- **Operator tested:** `v0.7.5-fm32a-interests1`, merged PR #35, one managed module `bob_friend_scout.py` from `v0.7.5-fm31-watch1`.
3838
- **What shipped in candidate:** explicit owner staging of Bob's *existing*, source-verified chosen Scout WHY from a current active friend; capped private SHA-sealed proposal records, independent source recheck on approval/reopen, status and reversible local history. No new model calls yet, and approved records do **not** influence memory or browsing.
39-
- **Next:** FM3.2b pagination/filtering and verified last-selected timestamps; FM3.2c fresh, bounded local-model proposals with provenance/uncertainty and mandatory owner review. Explicit one-friend public focus reads remain a later opt-in item.
39+
- **Next after FM3.2b:** FM3.2c fresh, bounded local-model proposals with provenance/uncertainty and mandatory owner review. Explicit one-friend public focus reads remain a later opt-in item.
4040
- **Deployment:** after offline test + PR review/merge, use only `bobctl update` with standard backup and rollback. Release handoff and short browser acceptance: [V075-FM32A-INTEREST-REVIEW.md](V075-FM32A-INTEREST-REVIEW.md). The prior Scout startup watch item stays open until a real scheduled timer-run is verified.
4141
- **Security:** no publication, platform follow/DM/comment, model prompt expansion, new automatic timer, private note disclosure or change to FM1/PM2 authority.
4242

43+
### FM3.2b implementation checkpoint (operator acceptance pending)
44+
45+
- **Candidate:** `v0.7.5-fm32b-watchlist1` upgrading directly from operator-tested `v0.7.5-fm32a-interests1`. Two managed files: existing `bob_friend_scout.py` and generated `bob-activity-manager`; dashboard restart only.
46+
- **What changes:** ten-per-page search/filter for all active integrity-checked friends (watched, paused, integrity problems), preserving the same view after a watch toggle. Last *friend-focused source* and last *chosen discussion* display timestamps only from bounded, checksum-verified saved Scout runs. Timestamps indicate saved snapshots and Bob's selections, **not live Moltbook presence or interactions**.
47+
- **Safety:** no new background timer, untrusted private notes in requests/prompts, credentials, network access, model tools or social publication rights. Existing authentication, Host, Origin, CSRF, digest-guarded watch changes and both auto-publishing protections remain intact.
48+
- **Acceptance:** synthetic tests/CI then one operator `bobctl update` and short LAN browser checks. See [V075-FM32B-WATCHLIST.md](V075-FM32B-WATCHLIST.md). Do not claim live Scout timer acceptance without separately observing a successful completed run.
49+
4350
## 3. FM4 — Social Memory and Evolving Relationships (NEW AGREED PHASE)
4451

4552
**Status: planned after FM3.2. Goal:** give Bob a grounded, revisable personal history with other agents rather than a flat address book.

‎docs/V075-FM32B-WATCHLIST.md‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# FM3.2b: paginated Friend Scout watchlist and evidence-linked recency
2+
3+
**Candidate:** `v0.7.5-fm32b-watchlist1`, from operator-confirmed `v0.7.5-fm32a-interests1`.
4+
5+
## Changes
6+
7+
On the existing authenticated **Moltbook → Friend Scout** page:
8+
9+
- **Pagination:** all integrity-verified *active* FM1 friends can be reached in stable, ten-agent pages (up to the existing 300-record FM1 cap), rather than showing only the first ten.
10+
- **Filter:** search by agent handle or display label; select **All active**, **Watched**, **Paused**, or **Integrity issues**. Private friend notes/interests are never searched or echoed. An invalid/out-of-range page is bounded; filter parameters are treated as view state only.
11+
- **Return after watch change:** individual watch-toggle forms carry the canonical page/filter in the action URL (no additional POST fields). After existing Basic authentication, Origin and CSRF checks and a successful digest-guarded change, the Activity Manager redirects only to a whitelist-built same-origin Friend Scout URL, retaining the operator's filtered page.
12+
- **Evidence-linked Scout recency:** a source-checked saved friend-focused post is labeled **Last verified friend-focused source**. A chosen author/post verified against the saved Scout feed is labeled **Last selected discussion**, including selections from the global feed. Both display the saved Scout run's UTC timestamp and run ID. These are local historical *observations*, not online-presence timestamps, a social exchange, account identity verification or proof of mutual friendship. If no suitable verified source exists among the **100 most recent saved Scout records**, the page states so rather than inventing dates.
13+
14+
All evidence lookups require independently validated saved Scout results, the exact associated feed checksum, valid post UUID and author matched to an integrity-checked active FM1 entry. Missing or altered sources provide **no activity timestamp**. No HTTP or model call is performed to display this information.
15+
16+
## Deployment and security
17+
18+
Two managed files change: `bob_friend_scout.py` and the generated `bob-activity-manager`. A new release builder derives from the previous `build_v075_logs_candidate.py` and performs exactly three pinned substitutions (module import, bounded GET query handoff, canonical post-update redirect). The navigation shell and previous dashboard auth, CSRF, publication handlers, and worker code remain byte-identical. The existing updater's verified backups and guarded rollback remain in force; the dashboard is the only requested restart. No new module installations are required.
19+
20+
Unchanged boundaries: global friend Scout default-off, individual watch pause, only two active watched friends inspected per Scout iteration, one public post each, at least four global posts, never automatic friend-targeted comments, manual review for outbound replies, no new schedule/network permissions/follows/DMs. FM3.2a interest reviews remain local-only.
21+
22+
## Offline acceptance
23+
24+
The synthetic tests cover 25 verified friends across three pages; watched/paused/issue filters; case-insensitive search; invalid parameters and escaped HTML; preserving the canonical view across a watch POST; independently verified last focused/last chosen reports, global selected-source distinction, absent/tampered evidence, and the *exact dashboard change set*. Full repository CI must pass before merging.
25+
26+
## Short operator acceptance
27+
28+
1. On OpenClawLab run **`bobctl update`** once; verify `v0.7.5-fm32a-interests1` → `v0.7.5-fm32b-watchlist1`, two files, then type **UPDATE**.
29+
2. In the authenticated LAN Activity Manager open **Moltbook → Friend Scout**. Search for an agent and filter by **Watched** or **Paused**. Toggle one friend's watch; verify the view stays filtered and the stored setting changes. With more than ten active agents, use **Next page**.
30+
3. If any verified saved friend-focused or selected discussions exist among recent Scout records, their UTC date/run appears in the card. If not, the empty-state label is correct. Neither page load nor filtering contacts Moltbook.
31+
4. Check that existing **Tentative interests** and prior manual publication behavior still work. No additional live commands are necessary.
32+
33+
## Follow-up
34+
35+
FM3.2c can add new bounded local-model interest suggestions only after separate source validation and owner review, including explicit uncertainty and provenance. The optional manually confirmed one-friend public read is a further opt-in design item; FM4 and FM5 remain separate later phases.

‎releases/current.json‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
{
22
"format": "bob-updater-v1",
3-
"release": "v0.7.5-fm32a-interests1",
4-
"from": "v0.7.5-fm31-watch1",
5-
"notes": "FM3.2a private source-verified Scout WHY interest staging and reversible owner review. One existing managed module; no network additions, new permissions or auto-publishing.",
3+
"release": "v0.7.5-fm32b-watchlist1",
4+
"from": "v0.7.5-fm32a-interests1",
5+
"notes": "FM3.2b ten-per-page Friend Scout filters and independent saved Scout recency. Preserve existing auth/CSRF, local watch preferences and publication guard; no network or job changes.",
66
"files": [
77
{
88
"name": "bob_friend_scout.py",
99
"source": "src/lib/bob/bob_friend_scout.py"
10+
},
11+
{
12+
"name": "bob-activity-manager",
13+
"builder": "scripts/build_v075_fm32b_candidate.py",
14+
"index": 0
1015
}
1116
],
1217
"restart_manager": true
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env python3
2+
"""FM3.2b: pass bounded GET filters to Friend Scout and retain view after watch POST.
3+
4+
Derives from the installed Logs-era dashboard builder. Never touches auth,
5+
CSRF, Origin, publication/Scout worker code, or navigation. No new imports
6+
beyond an existing installed managed module.
7+
"""
8+
from __future__ import annotations
9+
import build_v075_logs_candidate as prior
10+
11+
12+
def once(source,old,new):
13+
if source.count(old)!=1:
14+
raise ValueError("FM3.2b dashboard baseline drift; refusing release build")
15+
return source.replace(old,new,1)
16+
17+
18+
def build():
19+
manager,navigation=prior.build()
20+
src=manager.decode("utf-8")
21+
src=once(src,
22+
"safe_error as friend_scout_safe_error)",
23+
"safe_error as friend_scout_safe_error, "
24+
"watchlist_location as friend_scout_return_path)")
25+
src=once(src,
26+
"friend_scout_page(db,TOKEN,wrap,load_records())",
27+
"friend_scout_page(db,TOKEN,wrap,load_records(),"
28+
"parse_qs(urlsplit(self.path).query[:256],keep_blank_values=True))")
29+
src=once(src,
30+
'self.send_header("Location","/moltbook/friend-scout")',
31+
'self.send_header("Location",friend_scout_return_path(self.path))')
32+
compile(src,"bob-activity-manager","exec")
33+
return src.encode("utf-8"),navigation
34+
35+
36+
if __name__=="__main__":
37+
manager,nav=build()
38+
print("FM3.2b WATCHLIST DASHBOARD CANDIDATE: PASS")
39+
print("manager_bytes:",len(manager),"navigation_bytes:",len(nav))
40+
print("production_modified: NO")

0 commit comments

Comments
 (0)