Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/implicated systems #2994

Open
wants to merge 30 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8627c3b
Add implicated_systems to schema
clari182 Jul 23, 2024
668d177
Add implicated_systems to submission edit
clari182 Jul 23, 2024
e0826f8
Add implicated_systems to submission schema
clari182 Jul 24, 2024
0592698
Add implicated systems to submit form & add migration for incidents a…
clari182 Jul 26, 2024
adb0ab9
Update submit test with implicated_systems
clari182 Jul 26, 2024
a8b77bc
Merge branch 'staging' into feature/implicated-systems
clari182 Jul 26, 2024
a21e4bd
Add implicated_systems to incident history schema
clari182 Jul 29, 2024
8716725
Update implicated_systems icon on submission form
clari182 Jul 30, 2024
d6c9f87
Add missing popovers
clari182 Jul 30, 2024
bd5907a
Merge branch 'staging' into feature/implicated-systems
clari182 Aug 5, 2024
f68bb55
Add implicated_systems to server
clari182 Aug 5, 2024
d4e5041
Merge branch 'staging' into feature/implicated-systems
clari182 Aug 9, 2024
25f8158
Merge branch 'staging' into feature/implicated-systems
clari182 Aug 16, 2024
7e474fe
Add generated implicated_systems via codegen
clari182 Aug 16, 2024
0c8c86a
Add implicated_systems to types
clari182 Aug 16, 2024
85b6b05
Merge branch 'staging' into feature/implicated-systems
clari182 Aug 16, 2024
1178754
Merge branch 'staging' into feature/implicated-systems
clari182 Aug 19, 2024
c817a3e
Fix submit tests
clari182 Aug 19, 2024
09e6b6f
Update graphql.ts
clari182 Aug 19, 2024
6e7f7b2
Add implicated_systems to queries and cite page
clari182 Aug 20, 2024
d52046c
Send entityNames to forms for autocomplete
clari182 Aug 20, 2024
fb9defe
Add missing translations
clari182 Aug 20, 2024
3167008
Merge branch 'staging' into feature/implicated-systems
clari182 Aug 29, 2024
1317be2
Remove implicated_systems from realm
clari182 Aug 30, 2024
9d302b1
Add missing entity fields
clari182 Aug 30, 2024
b02fd12
Fix implicated_systems type on incidents
clari182 Sep 2, 2024
d89d3ec
Fix incidents tests for implicated_systems
clari182 Sep 4, 2024
984ef2f
Merge branch 'staging' into feature/implicated-systems
clari182 Sep 4, 2024
fdafa4e
Merge branch 'staging' into feature/implicated-systems
clari182 Oct 16, 2024
12fc2fe
Run codegen
clari182 Oct 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions site/gatsby-site/i18n/locales/en/popovers.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
"title": "Quiet",
"text": "Quiet reports are those that will not be published in the 'Latest Reports' section of the homepage. Quiet reports are used for reports that are useful for internal data but do not need to be promoted. If you are unsure, leave this field blank."
},
"implicated_systems": {
"title": "Implicated Systems",
"text": "The AI systems involved in the incident. If multiple, press “enter” to begin a new item."
},
"similarIncidentSearch": {
"title": "Search for similar incidents",
"text": "Search for a similar or dissimilar incident by typing an incident ID. If the resulting incident is similar click 'Yes', if it's dissimilar click 'No'. If you're not sure click 'Not sure'. Once selected, the incident will be added to the 'Manually-selected similar and dissimilar incidents' section of the form. Once added, if you want to remove it, click the 'Not Sure' button."
Expand Down
4 changes: 3 additions & 1 deletion site/gatsby-site/i18n/locales/es/entities.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
"{{count}} Report_plural": "{{count}} Reportes",
"Incidents involved as both Developer and Deployer": "Incidentes involucrados como desarrollador e implementador",
"Incidents Harmed By": "Afectado por Incidentes",
"Alleged: <2></2> developed and deployed an AI system, which harmed <5></5>.": "Presunto: un sistema de IA desarrollado e implementado por <2></2>, perjudicó a <5></5>.",
"Alleged: <2></2> developed and deployed an AI system, which harmed <6></6>.": "Presunto: un sistema de IA desarrollado e implementado por <2></2>, perjudicó a <6></6>.",
"The AI implicated system is": "El sistema de IA implicado es",
"The AI implicated systems are": "Los sistemas de IA implicados son",
"Alleged: <1></1> developed an AI system deployed by <4></4>, which harmed <6></6>.": "Presunto: un sistema de IA desarrollado por <1></1> e implementado por <4></4>, perjudicó a <6></6>.",
"Entities involved in AI Incidents": "^Entities involved in AI Incidents",
"{{count}} Incident responses": "{{count}} respuestas de incidentes",
Expand Down
4 changes: 4 additions & 0 deletions site/gatsby-site/i18n/locales/es/popovers.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
"title": "¿Es un informe silencioso?",
"text": "Los informes silenciosos son aquellos que no se publicarán en la sección 'Últimos informes' de la página de inicio. Los informes silenciosos se utilizan para informes que son útiles para datos internos pero que no necesitan promocionarse. Si no está seguro, deje este campo en blanco."
},
"implicated_systems": {
"title": "Sistemas implicados",
"text": "Los sistemas de IA involucrados en el incidente. Si son múltiples, presione “enter” después del elemento para ingresar uno nuevo."
},
"similarIncidentSearch": {
"title": "Buscar incidentes similares",
"text": "Busque un incidente similar o diferente escribiendo un ID de incidente. Si el incidente resultante es similar, haga clic en 'Sí', si es diferente, haga clic en 'No'. Si no está seguro, haga clic en 'No estoy seguro'. Una vez seleccionado, el incidente se agregará a la sección del formulario 'Incidentes similares y diferentes seleccionados manualmente'. Una vez agregado, si desea eliminarlo, haga clic en el botón “No estoy seguro”."
Expand Down
4 changes: 3 additions & 1 deletion site/gatsby-site/i18n/locales/es/submit.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,7 @@
"Saving changes...": "Guardando cambios...",
"Submit a new incident report to the Artificial Intelligence Incident Database": "Enviar un nuevo informe de incidente a la Base de Datos de Incidentes de Inteligencia Artificial",
"Draft saved": "Borrador guardado",
"Saving as draft...": "Guardando como borrador..."
"Saving as draft...": "Guardando como borrador...",
"Implicated Systems": "Sistemas Implicados",
"What systems were involved in the incident?": "¿Qué sistemas estuvieron involucrados en el incidente?"
}
1 change: 1 addition & 0 deletions site/gatsby-site/i18n/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@
"Redirecting...": "Redirigiendo",
"Random Incident": "Incidente aleatorio",
"Risk Checklists": "Control de Riesgos",
"Implicated Systems": "Sistemas Implicados",
"Manually-selected similar and dissimilar incidents": "Incidentes similares y disímiles seleccionados manualmente",
"Search similar/dissimilar Incident Id": "Buscar incidente similar/disímil por ID",
"Assigned similar/dissimilar incidents": "Incidentes similares/disímiles asignados",
Expand Down
4 changes: 3 additions & 1 deletion site/gatsby-site/i18n/locales/es/validation.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,7 @@
"*Description is required": "*La descripción es obligatoria",
"*Incident Date is required": "*Fecha del incidente es obligatoria",
"*Incident Date required": "*Fecha del incidente es obligatoria",
"*Incident ID(s) must be a number": "*El ID del incidente debe ser un número"
"*Incident ID(s) must be a number": "*El ID del incidente debe ser un número",
"Implicated Systems must have at least 3 characters": "Los sistemas implicados deben tener al menos 3 caracteres",
"Implicated Systems can't be longer than 200 characters": "Los sistemas implicados no pueden tener más de 200 caracteres"
}
4 changes: 3 additions & 1 deletion site/gatsby-site/i18n/locales/fr/entities.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@
"Editing Entity": "Modification de l'entité",
"Back to Entity: {{name}}": "Retour à l'entité: {{name}}",
"Entity updated successfully.": "Entité mise à jour avec succès.",
"Error updating Entity.": "Erreur lors de la mise à jour de l'entité."
"Error updating Entity.": "Erreur lors de la mise à jour de l'entité.",
"The AI implicated system is": "Le système d'IA impliqué est",
"The AI implicated systems are": "Les systèmes d'IA impliqués sont"
}
4 changes: 4 additions & 0 deletions site/gatsby-site/i18n/locales/fr/popovers.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
"title": "Est-ce un rapport silencieux ?",
"text": "Les rapports silencieux sont ceux qui ne seront pas publiés dans la section « Derniers rapports » de la page d'accueil. Les rapports silencieux sont utilisés pour les rapports utiles pour les données internes mais qui n'ont pas besoin d'être promus. Si vous n'êtes pas sûr, laissez ce champ vide."
},
"implicated_systems": {
"title": "Systèmes d'IA impliqués dans l'incident",
"text": "Si plusieurs, appuyez sur « entrée » pour commencer un nouvel élément"
},
"similarIncidentSearch": {
"title": "Rechercher des incidents similaires",
"text": "Recherchez un incident similaire ou différent en saisissant un ID d'incident. Si l'incident qui en résulte est similaire, cliquez sur « Oui », s'il est différent, cliquez sur « Non ». Si vous n'êtes pas sûr, cliquez sur « Pas sûr ». Une fois sélectionné, l'incident sera ajouté à la section « Incidents similaires et différents sélectionnés manuellement » du formulaire. Une fois ajouté, si vous souhaitez le supprimer, cliquez sur le bouton « Pas sûr »."
Expand Down
4 changes: 3 additions & 1 deletion site/gatsby-site/i18n/locales/fr/submit.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,7 @@
"Saving changes...": "Enregistrement des modifications...",
"Submit a new incident report to the Artificial Intelligence Incident Database.": "Soumettre un nouveau rapport d'incident à la base de données des incidents d'intelligence artificielle.",
"Draft saved": "Brouillon enregistré",
"Saving as draft...": "Enregistrement en tant que brouillon..."
"Saving as draft...": "Enregistrement en tant que brouillon...",
"Implicated Systems": "Systèmes impliqués",
"What systems were involved in the incident?": "Quels systèmes étaient impliqués dans l'incident ?"
}
2 changes: 2 additions & 0 deletions site/gatsby-site/i18n/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,8 @@
"Random Incident": "Incident au hasard",
"Read the Source": "Lire la source",
"Risk Checklists": "Contrôle des risques",
"Implicated Systems": "Systèmes impliqués",
"and": "et",
"Manually-selected similar and dissimilar incidents": "Incidents similaires et dissemblables sélectionnés manuellement",
"Search similar/dissimilar Incident Id": "Rechercher un incident similaire/dissimilaire",
"Assigned similar/dissimilar incidents": "Incidents similaires/dissimilaires attribués",
Expand Down
4 changes: 3 additions & 1 deletion site/gatsby-site/i18n/locales/fr/validation.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@
"*Description is required": "*La description est requise",
"*Incident Date is required": "*Date de l'incident requise",
"*Incident Date required": "*Date de l'incident requise",
"*Incident ID(s) must be a number": "*L'ID de l'incident doit être un nombre"
"*Incident ID(s) must be a number": "*L'ID de l'incident doit être un nombre",
"Implicated Systems must have at least 3 characters": "Les systèmes impliqués doivent comporter au moins 3 caractères",
"Implicated Systems can't be longer than 200 characters": "Les systèmes impliqués ne peuvent pas comporter plus de 200 caractères"
}
4 changes: 3 additions & 1 deletion site/gatsby-site/i18n/locales/ja/entities.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@
"Editing Entity": "組織の編集",
"Back to Entity: {{name}}": "組織に戻る: {{name}}",
"Entity updated successfully.": "組織が正常に更新されました。",
"Error updating Entity.": "組織の更新中にエラーが発生しました。"
"Error updating Entity.": "組織の更新中にエラーが発生しました。",
"The AI implicated system is": "関連するAIシステムは です",
"The AI implicated systems are": "関連するAIシステムは です"
}
4 changes: 4 additions & 0 deletions site/gatsby-site/i18n/locales/ja/popovers.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@
"title": "あなたです!",
"text": "現在ログイン中なのでこの投稿は自動的にあなたのアカウントに関連づけられます。匿名で投稿するには、ブラウザウィンドウを匿名モードで開いて投稿してください。"
},
"implicated_systems": {
"title": "インシデントに関与したAIシステム",
"text": "複数ある場合は、新しい項目を入力するためにEnterキーを押してください"
},
"similarIncidentSearch": {
"title": "類似の事件を検索",
"text": "インシデント ID を入力して、類似または非類似のインシデントを検索します。結果のインシデントが類似している場合は「はい」をクリックし、非類似の場合は「いいえ」をクリックします。不明な場合は「不明」をクリックします。選択すると、インシデントはフォームの「手動で選択された類似および非類似のインシデント」セクションに追加されます。追加した後で削除したい場合は、「わからない」ボタンをクリックします。"
Expand Down
4 changes: 3 additions & 1 deletion site/gatsby-site/i18n/locales/ja/submit.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,7 @@
"Clear Form": "フォームをクリアする",
"Saving changes...": "変更を保存中...",
"Draft saved": "下書きが保存されました",
"Saving as draft...": "下書きとして保存中..."
"Saving as draft...": "下書きとして保存中...",
"Implicated Systems": "関連システム",
"What systems were involved in the incident?": "このインシデントに関わるシステムは何ですか?"
}
4 changes: 3 additions & 1 deletion site/gatsby-site/i18n/locales/ja/validation.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@
"Please review report. Some data is missing.": "レポートを確認してください。足りない情報があります",
"Please review submission. Some data is missing.": "投稿を確認してください。足りない情報があります",
"Some data is missing.": "足りない情報があります",
"Please review. Some data is missing.": "確認してください。足りない情報があります"
"Please review. Some data is missing.": "確認してください。足りない情報があります",
"Implicated Systems must have at least 3 characters": "関連システムは3文字以上でなければいけません",
"Implicated Systems can't be longer than 200 characters": "関連システムは200文字を超えることはできません"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
const config = require('../config');
/**
*
* @param {{context: {client: import('mongodb').MongoClient}}} context
*/

exports.up = async ({ context: { client } }) => {
await client.connect();

// New implicated_systems field on submissions and incidents collections from production db and history db

const submissionsCollection = client
.db(config.realm.production_db.db_name)
.collection('submissions');

const submissionsHistoryCollection = client
.db(config.realm.production_db.db_history_name)
.collection('submissions');

const incidentsCollection = client.db(config.realm.production_db.db_name).collection('incidents');

const incidentsHistoryCollection = client
.db(config.realm.production_db.db_history_name)
.collection('incidents');

const submissionsUpdates = await submissionsCollection.updateMany(
{},
{
$set: {
implicated_systems: [],
},
}
);

console.log(
`Updated ${submissionsUpdates.modifiedCount} submissions with new implicated_systems field`
);

const submissionsHistoryUpdates = await submissionsHistoryCollection.updateMany(
{},
{
$set: {
implicated_systems: [],
},
}
);

console.log(
`Updated ${submissionsHistoryUpdates.modifiedCount} submissions history with new created_at field`
);

const incidentsUpdates = await incidentsCollection.updateMany(
{},
{
$set: {
implicated_systems: [],
},
}
);

console.log(
`Updated ${incidentsUpdates.modifiedCount} incidents with new implicated_systems field`
);

const incidentsHistoryUpdates = await incidentsHistoryCollection.updateMany(
{},
{
$set: {
implicated_systems: [],
},
}
);

console.log(
`Updated ${incidentsHistoryUpdates.modifiedCount} incidents history with new created_at field`
);
};
2 changes: 2 additions & 0 deletions site/gatsby-site/page-creators/createEntitiesPages.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const createEntitiesPages = async (graphql, createPage) => {
Alleged_deployer_of_AI_system
Alleged_developer_of_AI_system
Alleged_harmed_or_nearly_harmed_parties
implicated_systems
reports {
report_number
}
Expand Down Expand Up @@ -55,6 +56,7 @@ const createEntitiesPages = async (graphql, createPage) => {
incidentsAsDeveloper: entity.incidentsAsDeveloper,
incidentsAsBoth: entity.incidentsAsBoth,
incidentsHarmedBy: entity.incidentsHarmedBy,
incidentsImplicatedSystems: entity.incidentsImplicatedSystems,
relatedEntities: entity.relatedEntities,
responses: entity.responses,
},
Expand Down
Loading
Loading