Compare commits

..
8 Commits
Author SHA1 Message Date
james.maes fe39c2de0b Merge pull request 'fix(tables): the tables the assistant writes are written by nobody else; a person's save sets no field the server decides' (#122) from fix/system-written-tables-refuse-user-writes into develop
maven / build (push) Successful in 12m42s
build / maven (push) Successful in 12m42s
2026-11-21 06:11:32 +00:00
james.maesandClaude Fable 5.2 445c6b1973 fix(tables): the tables the assistant writes are written by nobody else; a person's save sets no field the server decides
maven / build (push) Successful in 9m54s
build / maven (push) Successful in 9m54s
Every table of the assistant has a decision about who writes it, by
operation (AssistantTableWrites); a table without one is not built. The
settings are edited by an administrator on a record screen. A conversation
is renamed, archived and deleted by its owner, and started only by the
assistant. Everything else (what was said and done, and what was spent) is
written by the assistant only.

The assistant enforces the decision itself, on any QQQ version: a table has
no capability for what a person may not do to it, so a screen is offered no
button and QQQ defines no bulk action; and the permission checker of every
table refuses the insert, update or delete a table route is about to make,
for every person, with 403 and a message that says why. The assistant's own
writes go through AssistantStore, in code, and are unchanged.

A person's save of a settings table sets no field that is not editable (the
id, the create date, who granted an override, health and test results, index
counters, a scheduled task's approval and run fields): StoredRecords.ofSave,
used by every settings customizer, takes them out of a USER save before a
rule sees them. A client that sends a whole record back keeps working.

Tests go through the real table routes against the fixture application.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 22:17:43 -06:00
james.maes 006224e9f9 Merge pull request 'fix(settings): a setting saved from its record screen is stored, and is held to its rules as it will be stored' (#120) from fix/budget-edit-over-http into develop
maven / build (push) Successful in 11m56s
build / maven (push) Successful in 11m56s
2026-11-21 03:44:03 +00:00
james.maesandClaude Fable 5.2 d7f382af39 test(settings): no customizer pairs a record with its stored row itself; StoredRecords for integer, long and text keys
maven / build (push) Successful in 11m8s
build / maven (push) Successful in 11m8s
ArchitectureTest refuses a call of oldRecordListToMap anywhere in the
assistant: the map is keyed by the stored key, and the key of a record saved
from a screen is text. StoredRecordsTest pairs a record with its stored row
for an integer, a long and a text key, with the key as text and as a number,
and covers the merged record, refusals and comparisons.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 19:29:37 -06:00
james.maesandClaude Fable 5.2 70ada072f4 fix(settings): a setting saved from its record screen is stored, and is held to its rules as it will be stored
maven / build (push) Successful in 10m14s
build / maven (push) Successful in 10m14s
A record screen saves through the UI API's table update route: only the
fields that were changed, with the version that was read. The record's key
comes from the request's path, so it reaches a table customizer as text.

AssistantBudgetCustomizer paired the record with its stored row by comparing
that text with the stored integer key, did not find the row, and judged the
one changed field as if it were a whole new budget: 400, nothing stored. The
same pairing was in every settings customizer: budget overrides, data access
rows, providers, knowledge sources and scheduled tasks were refused the same
way; a profile and a skill were stored with the defaults of a new row written
over what the save had not sent.

StoredRecords now does the pairing for all of them: the key of the record
and of each stored row are read as the type of the table's key field before
they are compared, the values being saved are laid over the stored row each
as the type of its field, and a change is found by comparing values of the
same type. A value that cannot be read as the type of its field is refused.

The rules (the host's ceiling on a cost limit, required fields, allowed
periods and scopes, an override's rules) are judged on the record as it will
be stored, for a save of one field exactly as for a save of all of them.

Tests go through the real route against the fixture application; fourteen of
the sixteen fail without the fix.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 19:01:19 -06:00
james.maes 8e2f745db6 Merge pull request 'feat(schema): every table has a create date and a modify date' (#118) from feat/table-standard-dates into develop
maven / build (push) Successful in 15m12s
build / maven (push) Successful in 15m12s
2026-11-20 15:58:15 +00:00
james.maesandClaude Fable 5.2 faeca595f6 fix(schema): a row written once has modifyDate equal to createDate exactly
maven / build (push) Successful in 11m52s
build / maven (push) Successful in 11m52s
QQQ's createDate and modifyDate behaviors each read the clock, so the two
values of one insert differ by a few microseconds on a clock finer than the
machine this was first run on. The decision claim and the budget event are
written once and never change; an insert customizer on those two tables makes
modifyDate the same instant as createDate. The test of the other tables no
longer asserts equality they cannot give (they are rewritten when a
transcript is redacted).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 09:13:31 -06:00
james.maesandClaude Fable 5.2 57798a67fc feat(schema): every table has a create date and a modify date
maven / build (push) Failing after 11m24s
build / maven (push) Failing after 11m24s
Nine tables lacked a standard date: eight had createDate but no modifyDate
(turn events, tool calls, feedback, model calls, data audit, budget events,
client errors, pending action claims) and the budget accounting table had
neither. All nine now declare both, date-time, not editable, set by QQQ.

Every write the QBit makes goes through QQQ's own insert and update actions,
so an insert sets both and an update (an incremented daily usage counter, a
decided pending action, a cleared tool result, a scheduled run that ends, the
accounting row that follows a usage row) moves modifyDate. A table that is
only inserted has modifyDate equal to createDate.

The reference DDL gets an additive block (nullable columns defaulting to the
time of the write, so the previous release keeps working; existing rows get
the table's own creation time). Tests iterate the declared tables, exercise
the store's insert and update paths, and check the DDL creates the columns.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 08:45:59 -06:00
+1 -1
View File
@@ -20,7 +20,7 @@
<!-- Multi-module build. The qqq-orb sets the revision here; the modules -->
<!-- inherit it, and the flatten plugin resolves it in the published POMs. -->
<properties>
<revision>0.1.0-RC.35</revision>
<revision>0.4.0-SNAPSHOT</revision>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>