mirror of
https://gh-proxy.org/https://github.com/klinsmaya/workdsh.git
synced 2026-11-09 01:47:06 +08:00
Merge pull request #810 from anywhere-labs/codex/fix-profile-channel-warning-loop
fix(profile): stop repeating uncertain channel warning
This commit is contained in:
@@ -127,7 +127,9 @@ export function inspectDesktopProfileChannelAdmission(
|
||||
const current = inspectDesktopReleaseProfileUsage(locations.current, profileDir, profileName)
|
||||
const other = inspectDesktopReleaseProfileUsage(locations.other, profileDir, profileName)
|
||||
if (other.status === 'invalid') {
|
||||
return { status: 'warn', reason: 'uncertain' }
|
||||
return current.status === 'valid'
|
||||
? { status: 'allow', reason: 'current-channel-latest' }
|
||||
: { status: 'warn', reason: 'uncertain' }
|
||||
}
|
||||
if (current.status === 'invalid') {
|
||||
// A damaged record in this package alone is not evidence of a channel
|
||||
|
||||
@@ -163,12 +163,15 @@ describe('Desktop Profile release-channel admission', () => {
|
||||
.toMatchObject({ status: 'warn', reason: 'other-channel-latest' })
|
||||
})
|
||||
|
||||
it('warns without claiming an owner when evidence is damaged', () => {
|
||||
it('warns for damaged evidence until the current release becomes healthy', () => {
|
||||
const target = fixture()
|
||||
const manifestPath = capture(target, target.locations.other, '2026-09-02T01:00:00.000Z')
|
||||
writeFileSync(manifestPath, '{broken')
|
||||
expect(inspectDesktopProfileChannelAdmission(target.locations, target.profile, 'work'))
|
||||
.toEqual({ status: 'warn', reason: 'uncertain' })
|
||||
capture(target, target.locations.current, '2026-09-02T01:00:01.000Z')
|
||||
expect(inspectDesktopProfileChannelAdmission(target.locations, target.profile, 'work'))
|
||||
.toEqual({ status: 'allow', reason: 'current-channel-latest' })
|
||||
|
||||
const currentOnly = fixture()
|
||||
const currentManifest = capture(currentOnly, currentOnly.locations.current, '2026-09-02T01:00:00.000Z')
|
||||
|
||||
@@ -127,7 +127,9 @@ export function inspectDesktopProfileChannelAdmission(
|
||||
const current = inspectDesktopReleaseProfileUsage(locations.current, profileDir, profileName)
|
||||
const other = inspectDesktopReleaseProfileUsage(locations.other, profileDir, profileName)
|
||||
if (other.status === 'invalid') {
|
||||
return { status: 'warn', reason: 'uncertain' }
|
||||
return current.status === 'valid'
|
||||
? { status: 'allow', reason: 'current-channel-latest' }
|
||||
: { status: 'warn', reason: 'uncertain' }
|
||||
}
|
||||
if (current.status === 'invalid') {
|
||||
// A damaged record in this package alone is not evidence of a channel
|
||||
|
||||
@@ -163,12 +163,15 @@ describe('Desktop Profile release-channel admission', () => {
|
||||
.toMatchObject({ status: 'warn', reason: 'other-channel-latest' })
|
||||
})
|
||||
|
||||
it('warns without claiming an owner when evidence is damaged', () => {
|
||||
it('warns for damaged evidence until the current release becomes healthy', () => {
|
||||
const target = fixture()
|
||||
const manifestPath = capture(target, target.locations.other, '2026-09-02T01:00:00.000Z')
|
||||
writeFileSync(manifestPath, '{broken')
|
||||
expect(inspectDesktopProfileChannelAdmission(target.locations, target.profile, 'work'))
|
||||
.toEqual({ status: 'warn', reason: 'uncertain' })
|
||||
capture(target, target.locations.current, '2026-09-02T01:00:01.000Z')
|
||||
expect(inspectDesktopProfileChannelAdmission(target.locations, target.profile, 'work'))
|
||||
.toEqual({ status: 'allow', reason: 'current-channel-latest' })
|
||||
|
||||
const currentOnly = fixture()
|
||||
const currentManifest = capture(currentOnly, currentOnly.locations.current, '2026-09-02T01:00:00.000Z')
|
||||
|
||||
Reference in New Issue
Block a user