You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(secrets): the secret audit log reads fields the API does not send, so dates and names look wrong #20173
autobot-backend/services/audit_logger.py:103AuditEntry.timestamp is a float of epoch seconds, and to_response_dict (:117) returns the fields as they are. Secrets details are in details; there is no metadata field.
autobot-frontend/src/composables/useSecretsAuditApi.ts:21 types timestamp as a string and has metadata. autobot-frontend/src/components/secrets/SecretAuditLog.vue then:
:117 does new Date(entry.timestamp), which treats seconds as milliseconds, so dates land in January 1970;
:104 reads entry.metadata?.secret_name, so every row reads "Unknown Secret" (the id falls back to resource).
Not known
Found by reading the code; not run against a live backend. Whether /audit/logs post-processes these entries further was checked only as far as autobot-backend/api/audit.py:123.
Fix
Type the row from the backend's fields, multiply the timestamp, and read details. This also lets the last two duplicate type names on #19910 (AuditLogEntry, AuditQueryResponse) become one declaration.
Acceptance criteria
A test with a real-shaped entry shows the right date, secret name and user.
Landed via the merge train (PR #20184), main 4e5b979 (member #20178). 1 of 3 ACs ticked; stays open.
Met: test with a real-shaped entry: autobot-frontend/src/components/secrets/__tests__/SecretAuditLog.test.ts asserts the secret name, the user, '5m ago' and no '1970'.
Not met: one declaration each. AuditQueryResponse is still declared in autobot-frontend/src/types/audit.ts:84 and autobot-slm-frontend/src/composables/useAutobotApi.ts:248, and repo_tests/duplicate_names_ratchet_14908_test.py still lists it in TYPE_EXCEPTIONS. AuditLogEntry is declared once (SLM only).
Referenced from #21011, which does not change this issue. The remaining AC (one declaration each for AuditLogEntry and AuditQueryResponse, exceptions removed) needs the shared kit's libs/autobot-ui/index.ts, which open PR #20986 holds, so it is left for after that lands. The host AC still needs a finished update.
Refs update: the PRs carrying this landed via train #21125 (merge commit 77eaa31). Delivered: see #20665 and #20640; this PR landed those parts. This issue stays open; no criteria were ticked here.
Merged via #21262 in train #21390 (merge commit 1b412de, 2026-11-12 ~18:40 Riga). Verified against merged main.
AC
Status
Evidence
1. Real-shaped entry test shows date, name, user
Ticked (already)
autobot-frontend/src/components/secrets/__tests__/SecretAuditLog.test.ts ("shows the real date, secret name and user of a backend row", fixture details: { name: 'prod-db-credential' }, asserts no 1970); SecretAuditLog.vue:118-130 reads details.name and auditTimestampToDate(entry.timestamp)
2. One declaration each, #19910 guard exceptions removed
Ticked
AuditQueryResponse declared once, in libs/autobot-ui/src/types/audit.ts:10, imported by both apps; AuditLogEntry declared once (autobot-slm-frontend/src/composables/useAutobotApi.ts:224), the main app uses AuditApiEntry; repo_tests/duplicate_names_ratchet_14908_test.py:53TYPE_EXCEPTIONS = {}, :50type_names_in_both_apps: 0
3. Host: real dates and names on the local install after a finished update
Unchecked
Host evidence needed. The install's user frontend still serves a pre-update bundle (#21343), so nothing about today's landing has been seen on a host
Boxes: 2 of 3 ticked. Issue stays open for AC3 only. Remaining: finish the update on the install (#21343), then look at the secret audit log and record the dates and names seen.
Activity
github-actions commentedon Oct 31, 2026
Landed via the merge train (#20184, merge
4e5b97957f) via #20178mrveiss commentedon Oct 31, 2026
Landed via the merge train (PR #20184), main 4e5b979 (member #20178). 1 of 3 ACs ticked; stays open.
autobot-frontend/src/components/secrets/__tests__/SecretAuditLog.test.tsasserts the secret name, the user, '5m ago' and no '1970'.AuditQueryResponseis still declared inautobot-frontend/src/types/audit.ts:84andautobot-slm-frontend/src/composables/useAutobotApi.ts:248, andrepo_tests/duplicate_names_ratchet_14908_test.pystill lists it inTYPE_EXCEPTIONS.AuditLogEntryis declared once (SLM only).mrveiss commentedon Nov 7, 2026
Referenced from #21011, which does not change this issue. The remaining AC (one declaration each for
AuditLogEntryandAuditQueryResponse, exceptions removed) needs the shared kit'slibs/autobot-ui/index.ts, which open PR #20986 holds, so it is left for after that lands. The host AC still needs a finished update.mrveiss commentedon Nov 8, 2026
Refs update: the PRs carrying this landed via train #21125 (merge commit 77eaa31). Delivered: see #20665 and #20640; this PR landed those parts. This issue stays open; no criteria were ticked here.
fix(audit): response carries the real outcome; schema comments correc…
fix(audit): declare AuditQueryResponse once in the kit, ratchet pin 1…
mrveiss commentedon Nov 12, 2026
Merged via #21262 in train #21390 (merge commit 1b412de, 2026-11-12 ~18:40 Riga). Verified against merged main.
autobot-frontend/src/components/secrets/__tests__/SecretAuditLog.test.ts("shows the real date, secret name and user of a backend row", fixturedetails: { name: 'prod-db-credential' }, asserts no1970);SecretAuditLog.vue:118-130readsdetails.nameandauditTimestampToDate(entry.timestamp)AuditQueryResponsedeclared once, inlibs/autobot-ui/src/types/audit.ts:10, imported by both apps;AuditLogEntrydeclared once (autobot-slm-frontend/src/composables/useAutobotApi.ts:224), the main app usesAuditApiEntry;repo_tests/duplicate_names_ratchet_14908_test.py:53TYPE_EXCEPTIONS = {},:50type_names_in_both_apps: 0Boxes: 2 of 3 ticked. Issue stays open for AC3 only. Remaining: finish the update on the install (#21343), then look at the secret audit log and record the dates and names seen.
github-actions commentedon Nov 12, 2026
Landed via the merge train (#21390, merge
1b412de635) via #21262fix(secrets): audit log reads the fields the API sends (mrveiss#20173)
github-actions commentedon Nov 17, 2026
Landed in #21732, merge
df23644add