# Knowledge administration acceptance — 2026-10-16

Scope: the Map AI Advisor knowledge management UI and its connection to the existing reviewed-knowledge tool. Delivery remains PR #210, `dev-chen → master`. No production merge, deployment, configuration change or database write was performed.

## Environment and material

The browser exercised the real Herd application at `https://petav3.test`, signed in as the existing Super Admin, John Ong. The browser database was the local copy `petav3_test_production_20260814`; PHPUnit used the separate `petav3_map_rag_20261013_testing` database. Only the new knowledge-administration migration was applied to these local databases.

Acceptance used the existing cloud generation/embedding configuration and local Qdrant, without browser response mocks or a local generation model. The application does not persist model-response identifiers for these planner/explanation calls; the evidence therefore does not claim a provider-returned model identifier for each turn.

The uploaded TXT was explicitly synthetic: **LOCAL TEST Cedar Court — facility note**, describing a bicycle room open **06:15–22:45**, access cards for residents, and visitors accompanied by a resident. Its source URL uses `example.com` and is a test citation, not an external source verification. Reviewer notes explicitly state that this is software acceptance, not mentor/Wai Kit approval of a real property. No formal business materials were approved by this exercise.

Original/downloaded file SHA-256:

`4a2c42d200509875e8e53e36f5479036ba8eb640d42bf283fbe2ab605e5ffc4a`

## Browser and retrieval results

| Check | Observed result |
|---|---|
| Upload TXT and inspect source | Private original retained; extracted text visible; authenticated original download matched the uploaded hash. |
| Prepare a fact | Source URL, section, exact excerpt, keywords and EN/ZH/MS answers saved through the form. |
| Review rejection | Required note recorded; item returned to draft and could be resubmitted. |
| Approval | Actual signed-in reviewer and time recorded; imported review claims cannot grant this state. |
| Edit approved material | Approval cleared; submit and approve required again. |
| Query before publication | After the source-isolation repair, the explicit document question returned `no_match` and no draft facts. |
| Publish | The new document became retrievable; complete library increased from 6 documents/20 facts to 7/21. |
| English answer and visitor follow-up | Correct opening hours and accompanied-visitor rule; no invented property location or listing. |
| Chinese → Malay → English | After the language repair, replies followed the current question, including repeating the failed Malay turn in its original saved conversation. |
| Source drawer | Correct title, exact excerpt, source URL, immutable document version and release displayed. |
| Rollback and republish | Original library restored; next publication reused all six unchanged version IDs, stored hashes and payloads. |
| Withdraw | Empty reason blocked; recorded reason retained; fresh same-question chat returned `no_match`. |
| Withdrawal after rollback | Withdrawn material remains discoverable under the Withdrawn filter even when the restored release excludes that document; it remains unavailable to Advisor. |
| Phone view | Management page at 390px had no horizontal document overflow; desktop workflow exercised at 1440px. |

Replay questions:

1. `According to the LOCAL TEST Cedar Court facility note, what are the bicycle room opening hours?`
2. `Can visitors enter the bicycle room on their own?`
3. `根据《LOCAL TEST Cedar Court — facility note》，自行车室几点开放？`
4. `Menurut dokumen LOCAL TEST Cedar Court — facility note, bila bilik basikal dibuka?`
5. Repeat question 4 in the same saved conversation after the language repair, then question 2 to switch back to English.
6. Repeat question 1 after the final publication and in a fresh conversation after withdrawal.

## Findings fixed during acceptance

- Keywords were bound only on `change`; other edits could discard the visible input before save. They now use an input buffer that preserves separators and unsaved text, normalizing only the submitted payload.
- An unpublished named source question initially returned unrelated approved fixture facts. A single explicit document scope now survives shortened model tool queries and is restricted to an exact normalized active, eligible document title/ID. Generic questions and multi-source comparisons retain the existing semantic retrieval behavior; this is not a universal relevance threshold or natural-language source parser.
- Chinese-to-Malay follow-up initially stayed Chinese. General Malay question/document cues and English follow-up cues now update the brief language; tests also retain the language for bare names/numbers.
- MySQL JSON object-key ordering initially created equivalent new versions of unchanged documents. Canonical comparison now reuses existing immutable versions, including legacy hashes; historical rows are not rewritten.
- Review/build checks also caught and fixed approved-draft reopening, missing withdrawal reasons, stale-library recovery, scoped Tailwind references, withdrawn-status filtering after rollback, and bounded PDF extraction.

Original failures remain in the evidence. This is staged repair and retest, not a claim that the first run passed.

## Automated checks

- Final isolated PHP scope: **488 tests, 4,078 assertions**, with the existing PHPUnit XML deprecation.
- Frontend PropertyLab scope: **139 tests across 21 files**, including 16 admin UI tests. Client and SSR builds pass.
- Migration-constant, suite-link and test-double guards pass. The suite-link guard retains its existing baseline of 67 bare destinations.
- New backend files and the changed parser/orchestrator/brief/test files pass Pint. Existing formatting failures in the Research controller, KnowledgeStore/KnowledgeLanguage and older Store tests are not represented as new failures or silently reformatted; baseline copies were checked where reported.
- Independent backend, frontend, concurrency and security reviews completed without remaining blocking findings.

Coverage includes all endpoint role gates, forged imported approvals, stale revision/release conflicts, concurrent import claims, edit/withdraw during indexing, index failure retention, immutable citations, preservation of other documents, bounded uploads, source-download authorization and rollback after withdrawal.

## Final local state and evidence

The final accepted publication was `a5427a0e-2bac-458c-ae53-93a34e6229fc`; the final English answer cited its Cedar version `b10d390c-5937-4b14-b114-040dc9c625f5`. After acceptance, Cedar was withdrawn and active release restored to **`c0ab82bc-ad03-4b33-b240-b5705f6df375`**, the original 6-document/20-fact library. Original version IDs, hashes and contents match the pre-test snapshot. Private sources and review/release history remain available for audit.

Local evidence directory (not committed as production data):

`/Users/dadadineiyou/.codex/visualizations/2026/10/12/01a12f91-79f1-73b2-9d6d-ff37c08b0136/map-advisor-knowledge-admin-20261016/`

Key records: `before-publish-20261016-050702-46278.json`, `republished-postfix-20261016-051507-50687.json`, `cleanup-final-20261016-051746-51827.json`, `14-final-published-conversation.txt`, `15-after-withdrawal.txt`, source-drawer and management screenshots. Read-only database snapshots used a guarded PDO transaction; they do not substitute for the actual browser mutations and cloud conversations.

Production still requires the configured services, reviewed migration, private-file persistence and approved business material described in [KNOWLEDGE_ADMIN.md](KNOWLEDGE_ADMIN.md) and [DEPLOYMENT.md](DEPLOYMENT.md). Uploading a document does not create verified map coordinates, transaction data or live property listings.
