fix(ci): track restarted provider evidence

This commit is contained in:
whyour
2026-08-22 16:42:36 +08:00
parent a1549b3a24
commit d55933d781
6 changed files with 45 additions and 6 deletions
@@ -12,6 +12,7 @@ const {
canI,
deployProvider,
executorJob,
providerObservationKey,
providerServerSource,
terminalJobSnapshot,
} = require('../../scripts/ql3-provider-credential-test-kubernetes-live-contract.cjs');
@@ -349,6 +350,19 @@ test('reads provider evidence from the exact ready Pod with trusted TLS SNI', ()
);
});
test('starts a fresh provider request baseline after a container restart', () => {
const pod = {
metadata: { uid: 'provider-uid' },
status: {
containerStatuses: [{ name: 'provider', restartCount: 0 }],
},
};
assert.equal(providerObservationKey(pod), 'provider-uid:0');
pod.status.containerStatuses[0].restartCount = 1;
assert.equal(providerObservationKey(pod), 'provider-uid:1');
});
test('provider fixture logs only generation and authorization decision', () => {
const source = providerServerSource();
assert.match(source, /event:'provider_request',generation,allowed/);